qwil_api 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +91 -0
  3. data/docs/AccountSerializer.md +18 -0
  4. data/docs/AccountsApi.md +243 -0
  5. data/docs/ApitokenauthApi.md +57 -0
  6. data/docs/CashoutCalculationSerializer.md +10 -0
  7. data/docs/CashoutSerializer.md +20 -0
  8. data/docs/CashoutSliceSerializer.md +11 -0
  9. data/docs/CashoutsApi.md +56 -0
  10. data/docs/CompanyInformationSerializer.md +18 -0
  11. data/docs/ContactInfoSerializer.md +10 -0
  12. data/docs/ContactInformationSerializer.md +16 -0
  13. data/docs/ContractorSerializer.md +20 -0
  14. data/docs/IncomeApi.md +98 -0
  15. data/docs/IncomeNestedSerializer.md +18 -0
  16. data/docs/IncomeSerializer.md +18 -0
  17. data/docs/IncomeSerializerFixedSource.md +18 -0
  18. data/docs/InvoiceSerializer.md +17 -0
  19. data/docs/InvoiceSerializerFixedSourceCreate.md +17 -0
  20. data/docs/InvoicesApi.md +98 -0
  21. data/docs/JSONWebTokenSerializer.md +7 -0
  22. data/docs/ManagerPlatformSerializer.md +22 -0
  23. data/docs/ManagerSerializer.md +10 -0
  24. data/docs/ManagersApi.md +172 -0
  25. data/docs/MembershipSerializer.md +9 -0
  26. data/docs/MembershipsApi.md +56 -0
  27. data/docs/PersonalInformationSerializer.md +16 -0
  28. data/docs/PlaidPublicTokenSerializer.md +8 -0
  29. data/docs/PlatformIncomeRequestSerializer.md +15 -0
  30. data/docs/PlatformMembershipRequestSerializer.md +11 -0
  31. data/docs/PlatformSerializer.md +30 -0
  32. data/docs/PlatformSummarySerializer.md +10 -0
  33. data/docs/PlatformsApi.md +1369 -0
  34. data/docs/RebateSerializer.md +15 -0
  35. data/docs/RebatesApi.md +98 -0
  36. data/docs/ReceivablesSerializer.md +9 -0
  37. data/docs/TaxSavingsSerializer.md +10 -0
  38. data/docs/UserAccountSerializer.md +17 -0
  39. data/docs/UserCashoutSerializer.md +20 -0
  40. data/docs/UserIncomeRequestSerializer.md +15 -0
  41. data/docs/UserPlatformMembershipRequestSerializer.md +13 -0
  42. data/docs/UserSerializer.md +40 -0
  43. data/docs/UsersApi.md +2173 -0
  44. data/docs/WriteAccountSerializer.md +16 -0
  45. data/docs/WriteCashoutCalculationSerializer.md +8 -0
  46. data/docs/WriteCashoutSerializer.md +16 -0
  47. data/docs/WriteCashoutSliceSerializer.md +11 -0
  48. data/docs/WriteCompanyInformationSerializer.md +17 -0
  49. data/docs/WriteContactInfoSerializer.md +10 -0
  50. data/docs/WriteContactInformationSerializer.md +15 -0
  51. data/docs/WriteContractorSerializer.md +14 -0
  52. data/docs/WriteIncomeNestedSerializer.md +12 -0
  53. data/docs/WriteIncomeSerializer.md +13 -0
  54. data/docs/WriteIncomeSerializerFixedSource.md +12 -0
  55. data/docs/WriteInvoiceSerializer.md +13 -0
  56. data/docs/WriteInvoiceSerializerFixedSourceCreate.md +9 -0
  57. data/docs/WriteJSONWebTokenSerializer.md +7 -0
  58. data/docs/WriteManagerPlatformSerializer.md +15 -0
  59. data/docs/WriteManagerSerializer.md +8 -0
  60. data/docs/WriteMembershipSerializer.md +8 -0
  61. data/docs/WritePersonalInformationSerializer.md +16 -0
  62. data/docs/WritePlaidPublicTokenSerializer.md +8 -0
  63. data/docs/WritePlatformIncomeRequestSerializer.md +10 -0
  64. data/docs/WritePlatformMembershipRequestSerializer.md +7 -0
  65. data/docs/WritePlatformSerializer.md +19 -0
  66. data/docs/WritePlatformSummarySerializer.md +8 -0
  67. data/docs/WriteRebateSerializer.md +9 -0
  68. data/docs/WriteReceivablesSerializer.md +8 -0
  69. data/docs/WriteTaxSavingsSerializer.md +8 -0
  70. data/docs/WriteUserAccountSerializer.md +14 -0
  71. data/docs/WriteUserCashoutSerializer.md +15 -0
  72. data/docs/WriteUserIncomeRequestSerializer.md +10 -0
  73. data/docs/WriteUserPlatformMembershipRequestSerializer.md +9 -0
  74. data/docs/WriteUserSerializer.md +21 -0
  75. data/generate-client.sh +6 -0
  76. data/lib/qwil_api/api/accounts_api.rb +320 -0
  77. data/lib/qwil_api/api/apitokenauth_api.rb +87 -0
  78. data/lib/qwil_api/api/cashouts_api.rb +89 -0
  79. data/lib/qwil_api/api/income_api.rb +142 -0
  80. data/lib/qwil_api/api/invoices_api.rb +142 -0
  81. data/lib/qwil_api/api/managers_api.rb +237 -0
  82. data/lib/qwil_api/api/memberships_api.rb +89 -0
  83. data/lib/qwil_api/api/platforms_api.rb +1674 -0
  84. data/lib/qwil_api/api/rebates_api.rb +142 -0
  85. data/lib/qwil_api/api/users_api.rb +2672 -0
  86. data/lib/qwil_api/api_client.rb +376 -0
  87. data/lib/qwil_api/api_error.rb +45 -0
  88. data/lib/qwil_api/configuration.rb +205 -0
  89. data/lib/qwil_api/models/account_serializer.rb +370 -0
  90. data/lib/qwil_api/models/cashout_calculation_serializer.rb +221 -0
  91. data/lib/qwil_api/models/cashout_serializer.rb +379 -0
  92. data/lib/qwil_api/models/cashout_slice_serializer.rb +232 -0
  93. data/lib/qwil_api/models/company_information_serializer.rb +299 -0
  94. data/lib/qwil_api/models/contact_info_serializer.rb +218 -0
  95. data/lib/qwil_api/models/contact_information_serializer.rb +280 -0
  96. data/lib/qwil_api/models/contractor_serializer.rb +361 -0
  97. data/lib/qwil_api/models/income_nested_serializer.rb +302 -0
  98. data/lib/qwil_api/models/income_serializer.rb +302 -0
  99. data/lib/qwil_api/models/income_serializer_fixed_source.rb +302 -0
  100. data/lib/qwil_api/models/invoice_serializer.rb +299 -0
  101. data/lib/qwil_api/models/invoice_serializer_fixed_source_create.rb +299 -0
  102. data/lib/qwil_api/models/json_web_token_serializer.rb +188 -0
  103. data/lib/qwil_api/models/manager_platform_serializer.rb +391 -0
  104. data/lib/qwil_api/models/manager_serializer.rb +218 -0
  105. data/lib/qwil_api/models/membership_serializer.rb +208 -0
  106. data/lib/qwil_api/models/personal_information_serializer.rb +279 -0
  107. data/lib/qwil_api/models/plaid_public_token_serializer.rb +199 -0
  108. data/lib/qwil_api/models/platform_income_request_serializer.rb +307 -0
  109. data/lib/qwil_api/models/platform_membership_request_serializer.rb +262 -0
  110. data/lib/qwil_api/models/platform_serializer.rb +480 -0
  111. data/lib/qwil_api/models/platform_summary_serializer.rb +218 -0
  112. data/lib/qwil_api/models/rebate_serializer.rb +276 -0
  113. data/lib/qwil_api/models/receivables_serializer.rb +208 -0
  114. data/lib/qwil_api/models/tax_savings_serializer.rb +219 -0
  115. data/lib/qwil_api/models/user_account_serializer.rb +359 -0
  116. data/lib/qwil_api/models/user_cashout_serializer.rb +379 -0
  117. data/lib/qwil_api/models/user_income_request_serializer.rb +307 -0
  118. data/lib/qwil_api/models/user_platform_membership_request_serializer.rb +283 -0
  119. data/lib/qwil_api/models/user_serializer.rb +592 -0
  120. data/lib/qwil_api/models/write_account_serializer.rb +331 -0
  121. data/lib/qwil_api/models/write_cashout_calculation_serializer.rb +198 -0
  122. data/lib/qwil_api/models/write_cashout_serializer.rb +316 -0
  123. data/lib/qwil_api/models/write_cashout_slice_serializer.rb +232 -0
  124. data/lib/qwil_api/models/write_company_information_serializer.rb +280 -0
  125. data/lib/qwil_api/models/write_contact_info_serializer.rb +218 -0
  126. data/lib/qwil_api/models/write_contact_information_serializer.rb +262 -0
  127. data/lib/qwil_api/models/write_contractor_serializer.rb +289 -0
  128. data/lib/qwil_api/models/write_income_nested_serializer.rb +236 -0
  129. data/lib/qwil_api/models/write_income_serializer.rb +247 -0
  130. data/lib/qwil_api/models/write_income_serializer_fixed_source.rb +236 -0
  131. data/lib/qwil_api/models/write_invoice_serializer.rb +252 -0
  132. data/lib/qwil_api/models/write_invoice_serializer_fixed_source_create.rb +210 -0
  133. data/lib/qwil_api/models/write_json_web_token_serializer.rb +188 -0
  134. data/lib/qwil_api/models/write_manager_platform_serializer.rb +314 -0
  135. data/lib/qwil_api/models/write_manager_serializer.rb +198 -0
  136. data/lib/qwil_api/models/write_membership_serializer.rb +198 -0
  137. data/lib/qwil_api/models/write_personal_information_serializer.rb +270 -0
  138. data/lib/qwil_api/models/write_plaid_public_token_serializer.rb +199 -0
  139. data/lib/qwil_api/models/write_platform_income_request_serializer.rb +220 -0
  140. data/lib/qwil_api/models/write_platform_membership_request_serializer.rb +188 -0
  141. data/lib/qwil_api/models/write_platform_serializer.rb +309 -0
  142. data/lib/qwil_api/models/write_platform_summary_serializer.rb +198 -0
  143. data/lib/qwil_api/models/write_rebate_serializer.rb +209 -0
  144. data/lib/qwil_api/models/write_receivables_serializer.rb +198 -0
  145. data/lib/qwil_api/models/write_tax_savings_serializer.rb +198 -0
  146. data/lib/qwil_api/models/write_user_account_serializer.rb +312 -0
  147. data/lib/qwil_api/models/write_user_cashout_serializer.rb +307 -0
  148. data/lib/qwil_api/models/write_user_income_request_serializer.rb +220 -0
  149. data/lib/qwil_api/models/write_user_platform_membership_request_serializer.rb +208 -0
  150. data/lib/qwil_api/models/write_user_serializer.rb +358 -0
  151. data/lib/qwil_api/version.rb +24 -0
  152. data/lib/qwil_api.rb +51 -0
  153. data/qwil_api.gemspec +53 -0
  154. data/spec/api/accounts_api_spec.rb +110 -0
  155. data/spec/api/apitokenauth_api_spec.rb +56 -0
  156. data/spec/api/cashouts_api_spec.rb +56 -0
  157. data/spec/api/income_api_spec.rb +67 -0
  158. data/spec/api/invoices_api_spec.rb +67 -0
  159. data/spec/api/managers_api_spec.rb +88 -0
  160. data/spec/api/memberships_api_spec.rb +56 -0
  161. data/spec/api/platforms_api_spec.rb +398 -0
  162. data/spec/api/rebates_api_spec.rb +67 -0
  163. data/spec/api/users_api_spec.rb +625 -0
  164. data/spec/api_client_spec.rb +235 -0
  165. data/spec/configuration_spec.rb +51 -0
  166. data/spec/models/account_serializer_spec.rb +111 -0
  167. data/spec/models/cashout_calculation_serializer_spec.rb +63 -0
  168. data/spec/models/cashout_serializer_spec.rb +135 -0
  169. data/spec/models/cashout_slice_serializer_spec.rb +69 -0
  170. data/spec/models/company_information_serializer_spec.rb +111 -0
  171. data/spec/models/contact_info_serializer_spec.rb +63 -0
  172. data/spec/models/contact_information_serializer_spec.rb +99 -0
  173. data/spec/models/contractor_serializer_spec.rb +127 -0
  174. data/spec/models/income_nested_serializer_spec.rb +111 -0
  175. data/spec/models/income_serializer_fixed_source_spec.rb +111 -0
  176. data/spec/models/income_serializer_spec.rb +111 -0
  177. data/spec/models/invoice_serializer_fixed_source_create_spec.rb +105 -0
  178. data/spec/models/invoice_serializer_spec.rb +105 -0
  179. data/spec/models/json_web_token_serializer_spec.rb +45 -0
  180. data/spec/models/manager_platform_serializer_spec.rb +143 -0
  181. data/spec/models/manager_serializer_spec.rb +63 -0
  182. data/spec/models/membership_serializer_spec.rb +57 -0
  183. data/spec/models/personal_information_serializer_spec.rb +99 -0
  184. data/spec/models/plaid_public_token_serializer_spec.rb +51 -0
  185. data/spec/models/platform_income_request_serializer_spec.rb +97 -0
  186. data/spec/models/platform_membership_request_serializer_spec.rb +73 -0
  187. data/spec/models/platform_serializer_spec.rb +191 -0
  188. data/spec/models/platform_summary_serializer_spec.rb +63 -0
  189. data/spec/models/rebate_serializer_spec.rb +93 -0
  190. data/spec/models/receivables_serializer_spec.rb +57 -0
  191. data/spec/models/tax_savings_serializer_spec.rb +63 -0
  192. data/spec/models/user_account_serializer_spec.rb +105 -0
  193. data/spec/models/user_cashout_serializer_spec.rb +135 -0
  194. data/spec/models/user_income_request_serializer_spec.rb +97 -0
  195. data/spec/models/user_platform_membership_request_serializer_spec.rb +85 -0
  196. data/spec/models/user_serializer_spec.rb +251 -0
  197. data/spec/models/write_account_serializer_spec.rb +99 -0
  198. data/spec/models/write_cashout_calculation_serializer_spec.rb +51 -0
  199. data/spec/models/write_cashout_serializer_spec.rb +107 -0
  200. data/spec/models/write_cashout_slice_serializer_spec.rb +69 -0
  201. data/spec/models/write_company_information_serializer_spec.rb +105 -0
  202. data/spec/models/write_contact_info_serializer_spec.rb +63 -0
  203. data/spec/models/write_contact_information_serializer_spec.rb +93 -0
  204. data/spec/models/write_contractor_serializer_spec.rb +91 -0
  205. data/spec/models/write_income_nested_serializer_spec.rb +75 -0
  206. data/spec/models/write_income_serializer_fixed_source_spec.rb +75 -0
  207. data/spec/models/write_income_serializer_spec.rb +81 -0
  208. data/spec/models/write_invoice_serializer_fixed_source_create_spec.rb +57 -0
  209. data/spec/models/write_invoice_serializer_spec.rb +81 -0
  210. data/spec/models/write_json_web_token_serializer_spec.rb +45 -0
  211. data/spec/models/write_manager_platform_serializer_spec.rb +101 -0
  212. data/spec/models/write_manager_serializer_spec.rb +51 -0
  213. data/spec/models/write_membership_serializer_spec.rb +51 -0
  214. data/spec/models/write_personal_information_serializer_spec.rb +99 -0
  215. data/spec/models/write_plaid_public_token_serializer_spec.rb +51 -0
  216. data/spec/models/write_platform_income_request_serializer_spec.rb +63 -0
  217. data/spec/models/write_platform_membership_request_serializer_spec.rb +45 -0
  218. data/spec/models/write_platform_serializer_spec.rb +117 -0
  219. data/spec/models/write_platform_summary_serializer_spec.rb +51 -0
  220. data/spec/models/write_rebate_serializer_spec.rb +57 -0
  221. data/spec/models/write_receivables_serializer_spec.rb +51 -0
  222. data/spec/models/write_tax_savings_serializer_spec.rb +51 -0
  223. data/spec/models/write_user_account_serializer_spec.rb +87 -0
  224. data/spec/models/write_user_cashout_serializer_spec.rb +101 -0
  225. data/spec/models/write_user_income_request_serializer_spec.rb +63 -0
  226. data/spec/models/write_user_platform_membership_request_serializer_spec.rb +57 -0
  227. data/spec/models/write_user_serializer_spec.rb +133 -0
  228. data/spec/spec_helper.rb +120 -0
  229. data/swagger-codegen-config.json +9 -0
  230. metadata +527 -0
@@ -0,0 +1,2672 @@
1
+ =begin
2
+ #No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
3
+
4
+ OpenAPI spec version:
5
+
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+ Licensed under the Apache License, Version 2.0 (the "License");
9
+ you may not use this file except in compliance with the License.
10
+ You may obtain a copy of the License at
11
+
12
+ http://www.apache.org/licenses/LICENSE-2.0
13
+
14
+ Unless required by applicable law or agreed to in writing, software
15
+ distributed under the License is distributed on an "AS IS" BASIS,
16
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ See the License for the specific language governing permissions and
18
+ limitations under the License.
19
+
20
+ =end
21
+
22
+ require "uri"
23
+
24
+ module QwilAPI
25
+ class UsersApi
26
+ attr_accessor :api_client
27
+
28
+ def initialize(api_client = ApiClient.default)
29
+ @api_client = api_client
30
+ end
31
+
32
+ # The bank accounts for a specific User
33
+ # 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 https://api.qwil.co/accounts/1/ {...} { \"url\": \"https://api.qwil.co/accounts/2/\", ... }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/<user_id>/accounts/ list.<br/>To view even deleted accounts, use the URL /users/<user_id>/accounts/?show_deleted=true<br/>Note that deleted Accounts can still be retrieved directly, e.g.<br/>GET https://api.qwil.co/accounts/1/ { ... \"deleted\": \"true\", ... }
34
+ # @param user_pk
35
+ # @param account_number
36
+ # @param name The user&#39;s label for this Account.
37
+ # @param routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length.
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account.
40
+ # @option opts [BOOLEAN] :is_mychoice Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in.
41
+ # @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API.
42
+ # @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API.
43
+ # @return [UserAccountSerializer]
44
+ def account_user_create(user_pk, account_number, name, routing_number, opts = {})
45
+ data, _status_code, _headers = account_user_create_with_http_info(user_pk, account_number, name, routing_number, opts)
46
+ return data
47
+ end
48
+
49
+ # The bank accounts for a specific User
50
+ # 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 https://api.qwil.co/accounts/1/ {...} { \&quot;url\&quot;: \&quot;https://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 https://api.qwil.co/accounts/1/ { ... \&quot;deleted\&quot;: \&quot;true\&quot;, ... }
51
+ # @param user_pk
52
+ # @param account_number
53
+ # @param name The user&#39;s label for this Account.
54
+ # @param routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length.
55
+ # @param [Hash] opts the optional parameters
56
+ # @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account.
57
+ # @option opts [BOOLEAN] :is_mychoice Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in.
58
+ # @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API.
59
+ # @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API.
60
+ # @return [Array<(UserAccountSerializer, Fixnum, Hash)>] UserAccountSerializer data, response status code and response headers
61
+ def account_user_create_with_http_info(user_pk, account_number, name, routing_number, opts = {})
62
+ if @api_client.config.debugging
63
+ @api_client.config.logger.debug "Calling API: UsersApi.account_user_create ..."
64
+ end
65
+ # verify the required parameter 'user_pk' is set
66
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.account_user_create" if user_pk.nil?
67
+ # verify the required parameter 'account_number' is set
68
+ fail ArgumentError, "Missing the required parameter 'account_number' when calling UsersApi.account_user_create" if account_number.nil?
69
+ # verify the required parameter 'name' is set
70
+ fail ArgumentError, "Missing the required parameter 'name' when calling UsersApi.account_user_create" if name.nil?
71
+ # verify the required parameter 'routing_number' is set
72
+ fail ArgumentError, "Missing the required parameter 'routing_number' when calling UsersApi.account_user_create" if routing_number.nil?
73
+ # resource path
74
+ local_var_path = "/users/{user_pk}/accounts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
75
+
76
+ # query parameters
77
+ query_params = {}
78
+
79
+ # header parameters
80
+ header_params = {}
81
+
82
+ # HTTP header 'Accept' (if needed)
83
+ local_header_accept = []
84
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
85
+
86
+ # HTTP header 'Content-Type'
87
+ local_header_content_type = []
88
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
89
+
90
+ # form parameters
91
+ form_params = {}
92
+ form_params["account_number"] = account_number
93
+ form_params["name"] = name
94
+ form_params["routing_number"] = routing_number
95
+ form_params["is_paypal"] = opts[:'is_paypal'] if !opts[:'is_paypal'].nil?
96
+ form_params["is_mychoice"] = opts[:'is_mychoice'] if !opts[:'is_mychoice'].nil?
97
+ form_params["mychoice_user_id"] = opts[:'mychoice_user_id'] if !opts[:'mychoice_user_id'].nil?
98
+ form_params["mychoice_card_id"] = opts[:'mychoice_card_id'] if !opts[:'mychoice_card_id'].nil?
99
+
100
+ # http body (model)
101
+ post_body = nil
102
+ auth_names = []
103
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
104
+ :header_params => header_params,
105
+ :query_params => query_params,
106
+ :form_params => form_params,
107
+ :body => post_body,
108
+ :auth_names => auth_names,
109
+ :return_type => 'UserAccountSerializer')
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug "API called: UsersApi#account_user_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
112
+ end
113
+ return data, status_code, headers
114
+ end
115
+
116
+ # The bank accounts for a specific User
117
+ # 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 https://api.qwil.co/accounts/1/ {...} { \"url\": \"https://api.qwil.co/accounts/2/\", ... }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/<user_id>/accounts/ list.<br/>To view even deleted accounts, use the URL /users/<user_id>/accounts/?show_deleted=true<br/>Note that deleted Accounts can still be retrieved directly, e.g.<br/>GET https://api.qwil.co/accounts/1/ { ... \"deleted\": \"true\", ... }
118
+ # @param user_pk
119
+ # @param pk
120
+ # @param [Hash] opts the optional parameters
121
+ # @return [UserAccountSerializer]
122
+ def account_user_destroy(user_pk, pk, opts = {})
123
+ data, _status_code, _headers = account_user_destroy_with_http_info(user_pk, pk, opts)
124
+ return data
125
+ end
126
+
127
+ # The bank accounts for a specific User
128
+ # 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 https://api.qwil.co/accounts/1/ {...} { \&quot;url\&quot;: \&quot;https://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 https://api.qwil.co/accounts/1/ { ... \&quot;deleted\&quot;: \&quot;true\&quot;, ... }
129
+ # @param user_pk
130
+ # @param pk
131
+ # @param [Hash] opts the optional parameters
132
+ # @return [Array<(UserAccountSerializer, Fixnum, Hash)>] UserAccountSerializer data, response status code and response headers
133
+ def account_user_destroy_with_http_info(user_pk, pk, opts = {})
134
+ if @api_client.config.debugging
135
+ @api_client.config.logger.debug "Calling API: UsersApi.account_user_destroy ..."
136
+ end
137
+ # verify the required parameter 'user_pk' is set
138
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.account_user_destroy" if user_pk.nil?
139
+ # verify the required parameter 'pk' is set
140
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.account_user_destroy" if pk.nil?
141
+ # resource path
142
+ local_var_path = "/users/{user_pk}/accounts/{pk}/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)
143
+
144
+ # query parameters
145
+ query_params = {}
146
+
147
+ # header parameters
148
+ header_params = {}
149
+
150
+ # HTTP header 'Accept' (if needed)
151
+ local_header_accept = []
152
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
153
+
154
+ # HTTP header 'Content-Type'
155
+ local_header_content_type = []
156
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
157
+
158
+ # form parameters
159
+ form_params = {}
160
+
161
+ # http body (model)
162
+ post_body = nil
163
+ auth_names = []
164
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
165
+ :header_params => header_params,
166
+ :query_params => query_params,
167
+ :form_params => form_params,
168
+ :body => post_body,
169
+ :auth_names => auth_names,
170
+ :return_type => 'UserAccountSerializer')
171
+ if @api_client.config.debugging
172
+ @api_client.config.logger.debug "API called: UsersApi#account_user_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
173
+ end
174
+ return data, status_code, headers
175
+ end
176
+
177
+ # The bank accounts for a specific User
178
+ # 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 https://api.qwil.co/accounts/1/ {...} { \"url\": \"https://api.qwil.co/accounts/2/\", ... }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/<user_id>/accounts/ list.<br/>To view even deleted accounts, use the URL /users/<user_id>/accounts/?show_deleted=true<br/>Note that deleted Accounts can still be retrieved directly, e.g.<br/>GET https://api.qwil.co/accounts/1/ { ... \"deleted\": \"true\", ... }
179
+ # @param user_pk
180
+ # @param [Hash] opts the optional parameters
181
+ # @return [Array<UserAccountSerializer>]
182
+ def account_user_list(user_pk, opts = {})
183
+ data, _status_code, _headers = account_user_list_with_http_info(user_pk, opts)
184
+ return data
185
+ end
186
+
187
+ # The bank accounts for a specific User
188
+ # 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 https://api.qwil.co/accounts/1/ {...} { \&quot;url\&quot;: \&quot;https://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 https://api.qwil.co/accounts/1/ { ... \&quot;deleted\&quot;: \&quot;true\&quot;, ... }
189
+ # @param user_pk
190
+ # @param [Hash] opts the optional parameters
191
+ # @return [Array<(Array<UserAccountSerializer>, Fixnum, Hash)>] Array<UserAccountSerializer> data, response status code and response headers
192
+ def account_user_list_with_http_info(user_pk, opts = {})
193
+ if @api_client.config.debugging
194
+ @api_client.config.logger.debug "Calling API: UsersApi.account_user_list ..."
195
+ end
196
+ # verify the required parameter 'user_pk' is set
197
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.account_user_list" if user_pk.nil?
198
+ # resource path
199
+ local_var_path = "/users/{user_pk}/accounts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
200
+
201
+ # query parameters
202
+ query_params = {}
203
+
204
+ # header parameters
205
+ header_params = {}
206
+
207
+ # HTTP header 'Accept' (if needed)
208
+ local_header_accept = []
209
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
210
+
211
+ # HTTP header 'Content-Type'
212
+ local_header_content_type = []
213
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
214
+
215
+ # form parameters
216
+ form_params = {}
217
+
218
+ # http body (model)
219
+ post_body = nil
220
+ auth_names = []
221
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
222
+ :header_params => header_params,
223
+ :query_params => query_params,
224
+ :form_params => form_params,
225
+ :body => post_body,
226
+ :auth_names => auth_names,
227
+ :return_type => 'Array<UserAccountSerializer>')
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug "API called: UsersApi#account_user_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
230
+ end
231
+ return data, status_code, headers
232
+ end
233
+
234
+ # The bank accounts for a specific User
235
+ # 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 https://api.qwil.co/accounts/1/ {...} { \"url\": \"https://api.qwil.co/accounts/2/\", ... }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/<user_id>/accounts/ list.<br/>To view even deleted accounts, use the URL /users/<user_id>/accounts/?show_deleted=true<br/>Note that deleted Accounts can still be retrieved directly, e.g.<br/>GET https://api.qwil.co/accounts/1/ { ... \"deleted\": \"true\", ... }
236
+ # @param user_pk
237
+ # @param pk
238
+ # @param [Hash] opts the optional parameters
239
+ # @option opts [String] :account_number
240
+ # @option opts [String] :name The user&#39;s label for this Account.
241
+ # @option opts [String] :routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length.
242
+ # @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account.
243
+ # @option opts [BOOLEAN] :is_mychoice Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in.
244
+ # @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API.
245
+ # @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API.
246
+ # @return [UserAccountSerializer]
247
+ def account_user_partial_update(user_pk, pk, opts = {})
248
+ data, _status_code, _headers = account_user_partial_update_with_http_info(user_pk, pk, opts)
249
+ return data
250
+ end
251
+
252
+ # The bank accounts for a specific User
253
+ # 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 https://api.qwil.co/accounts/1/ {...} { \&quot;url\&quot;: \&quot;https://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 https://api.qwil.co/accounts/1/ { ... \&quot;deleted\&quot;: \&quot;true\&quot;, ... }
254
+ # @param user_pk
255
+ # @param pk
256
+ # @param [Hash] opts the optional parameters
257
+ # @option opts [String] :account_number
258
+ # @option opts [String] :name The user&#39;s label for this Account.
259
+ # @option opts [String] :routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length.
260
+ # @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account.
261
+ # @option opts [BOOLEAN] :is_mychoice Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in.
262
+ # @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API.
263
+ # @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API.
264
+ # @return [Array<(UserAccountSerializer, Fixnum, Hash)>] UserAccountSerializer data, response status code and response headers
265
+ def account_user_partial_update_with_http_info(user_pk, pk, opts = {})
266
+ if @api_client.config.debugging
267
+ @api_client.config.logger.debug "Calling API: UsersApi.account_user_partial_update ..."
268
+ end
269
+ # verify the required parameter 'user_pk' is set
270
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.account_user_partial_update" if user_pk.nil?
271
+ # verify the required parameter 'pk' is set
272
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.account_user_partial_update" if pk.nil?
273
+ # resource path
274
+ local_var_path = "/users/{user_pk}/accounts/{pk}/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)
275
+
276
+ # query parameters
277
+ query_params = {}
278
+
279
+ # header parameters
280
+ header_params = {}
281
+
282
+ # HTTP header 'Accept' (if needed)
283
+ local_header_accept = []
284
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
285
+
286
+ # HTTP header 'Content-Type'
287
+ local_header_content_type = []
288
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
289
+
290
+ # form parameters
291
+ form_params = {}
292
+ form_params["account_number"] = opts[:'account_number'] if !opts[:'account_number'].nil?
293
+ form_params["name"] = opts[:'name'] if !opts[:'name'].nil?
294
+ form_params["routing_number"] = opts[:'routing_number'] if !opts[:'routing_number'].nil?
295
+ form_params["is_paypal"] = opts[:'is_paypal'] if !opts[:'is_paypal'].nil?
296
+ form_params["is_mychoice"] = opts[:'is_mychoice'] if !opts[:'is_mychoice'].nil?
297
+ form_params["mychoice_user_id"] = opts[:'mychoice_user_id'] if !opts[:'mychoice_user_id'].nil?
298
+ form_params["mychoice_card_id"] = opts[:'mychoice_card_id'] if !opts[:'mychoice_card_id'].nil?
299
+
300
+ # http body (model)
301
+ post_body = nil
302
+ auth_names = []
303
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
304
+ :header_params => header_params,
305
+ :query_params => query_params,
306
+ :form_params => form_params,
307
+ :body => post_body,
308
+ :auth_names => auth_names,
309
+ :return_type => 'UserAccountSerializer')
310
+ if @api_client.config.debugging
311
+ @api_client.config.logger.debug "API called: UsersApi#account_user_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
312
+ end
313
+ return data, status_code, headers
314
+ end
315
+
316
+ # The bank accounts for a specific User
317
+ # 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 https://api.qwil.co/accounts/1/ {...} { \"url\": \"https://api.qwil.co/accounts/2/\", ... }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/<user_id>/accounts/ list.<br/>To view even deleted accounts, use the URL /users/<user_id>/accounts/?show_deleted=true<br/>Note that deleted Accounts can still be retrieved directly, e.g.<br/>GET https://api.qwil.co/accounts/1/ { ... \"deleted\": \"true\", ... }
318
+ # @param user_pk
319
+ # @param pk
320
+ # @param [Hash] opts the optional parameters
321
+ # @return [UserAccountSerializer]
322
+ def account_user_retrieve(user_pk, pk, opts = {})
323
+ data, _status_code, _headers = account_user_retrieve_with_http_info(user_pk, pk, opts)
324
+ return data
325
+ end
326
+
327
+ # The bank accounts for a specific User
328
+ # 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 https://api.qwil.co/accounts/1/ {...} { \&quot;url\&quot;: \&quot;https://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 https://api.qwil.co/accounts/1/ { ... \&quot;deleted\&quot;: \&quot;true\&quot;, ... }
329
+ # @param user_pk
330
+ # @param pk
331
+ # @param [Hash] opts the optional parameters
332
+ # @return [Array<(UserAccountSerializer, Fixnum, Hash)>] UserAccountSerializer data, response status code and response headers
333
+ def account_user_retrieve_with_http_info(user_pk, pk, opts = {})
334
+ if @api_client.config.debugging
335
+ @api_client.config.logger.debug "Calling API: UsersApi.account_user_retrieve ..."
336
+ end
337
+ # verify the required parameter 'user_pk' is set
338
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.account_user_retrieve" if user_pk.nil?
339
+ # verify the required parameter 'pk' is set
340
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.account_user_retrieve" if pk.nil?
341
+ # resource path
342
+ local_var_path = "/users/{user_pk}/accounts/{pk}/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)
343
+
344
+ # query parameters
345
+ query_params = {}
346
+
347
+ # header parameters
348
+ header_params = {}
349
+
350
+ # HTTP header 'Accept' (if needed)
351
+ local_header_accept = []
352
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
353
+
354
+ # HTTP header 'Content-Type'
355
+ local_header_content_type = []
356
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
357
+
358
+ # form parameters
359
+ form_params = {}
360
+
361
+ # http body (model)
362
+ post_body = nil
363
+ auth_names = []
364
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
365
+ :header_params => header_params,
366
+ :query_params => query_params,
367
+ :form_params => form_params,
368
+ :body => post_body,
369
+ :auth_names => auth_names,
370
+ :return_type => 'UserAccountSerializer')
371
+ if @api_client.config.debugging
372
+ @api_client.config.logger.debug "API called: UsersApi#account_user_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
373
+ end
374
+ return data, status_code, headers
375
+ end
376
+
377
+ # The bank accounts for a specific User
378
+ # 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 https://api.qwil.co/accounts/1/ {...} { \"url\": \"https://api.qwil.co/accounts/2/\", ... }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/<user_id>/accounts/ list.<br/>To view even deleted accounts, use the URL /users/<user_id>/accounts/?show_deleted=true<br/>Note that deleted Accounts can still be retrieved directly, e.g.<br/>GET https://api.qwil.co/accounts/1/ { ... \"deleted\": \"true\", ... }
379
+ # @param user_pk
380
+ # @param pk
381
+ # @param account_number
382
+ # @param name The user&#39;s label for this Account.
383
+ # @param routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length.
384
+ # @param [Hash] opts the optional parameters
385
+ # @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account.
386
+ # @option opts [BOOLEAN] :is_mychoice Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in.
387
+ # @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API.
388
+ # @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API.
389
+ # @return [UserAccountSerializer]
390
+ def account_user_update(user_pk, pk, account_number, name, routing_number, opts = {})
391
+ data, _status_code, _headers = account_user_update_with_http_info(user_pk, pk, account_number, name, routing_number, opts)
392
+ return data
393
+ end
394
+
395
+ # The bank accounts for a specific User
396
+ # 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 https://api.qwil.co/accounts/1/ {...} { \&quot;url\&quot;: \&quot;https://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 https://api.qwil.co/accounts/1/ { ... \&quot;deleted\&quot;: \&quot;true\&quot;, ... }
397
+ # @param user_pk
398
+ # @param pk
399
+ # @param account_number
400
+ # @param name The user&#39;s label for this Account.
401
+ # @param routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length.
402
+ # @param [Hash] opts the optional parameters
403
+ # @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account.
404
+ # @option opts [BOOLEAN] :is_mychoice Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in.
405
+ # @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API.
406
+ # @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API.
407
+ # @return [Array<(UserAccountSerializer, Fixnum, Hash)>] UserAccountSerializer data, response status code and response headers
408
+ def account_user_update_with_http_info(user_pk, pk, account_number, name, routing_number, opts = {})
409
+ if @api_client.config.debugging
410
+ @api_client.config.logger.debug "Calling API: UsersApi.account_user_update ..."
411
+ end
412
+ # verify the required parameter 'user_pk' is set
413
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.account_user_update" if user_pk.nil?
414
+ # verify the required parameter 'pk' is set
415
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.account_user_update" if pk.nil?
416
+ # verify the required parameter 'account_number' is set
417
+ fail ArgumentError, "Missing the required parameter 'account_number' when calling UsersApi.account_user_update" if account_number.nil?
418
+ # verify the required parameter 'name' is set
419
+ fail ArgumentError, "Missing the required parameter 'name' when calling UsersApi.account_user_update" if name.nil?
420
+ # verify the required parameter 'routing_number' is set
421
+ fail ArgumentError, "Missing the required parameter 'routing_number' when calling UsersApi.account_user_update" if routing_number.nil?
422
+ # resource path
423
+ local_var_path = "/users/{user_pk}/accounts/{pk}/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)
424
+
425
+ # query parameters
426
+ query_params = {}
427
+
428
+ # header parameters
429
+ header_params = {}
430
+
431
+ # HTTP header 'Accept' (if needed)
432
+ local_header_accept = []
433
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
434
+
435
+ # HTTP header 'Content-Type'
436
+ local_header_content_type = []
437
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
438
+
439
+ # form parameters
440
+ form_params = {}
441
+ form_params["account_number"] = account_number
442
+ form_params["name"] = name
443
+ form_params["routing_number"] = routing_number
444
+ form_params["is_paypal"] = opts[:'is_paypal'] if !opts[:'is_paypal'].nil?
445
+ form_params["is_mychoice"] = opts[:'is_mychoice'] if !opts[:'is_mychoice'].nil?
446
+ form_params["mychoice_user_id"] = opts[:'mychoice_user_id'] if !opts[:'mychoice_user_id'].nil?
447
+ form_params["mychoice_card_id"] = opts[:'mychoice_card_id'] if !opts[:'mychoice_card_id'].nil?
448
+
449
+ # http body (model)
450
+ post_body = nil
451
+ auth_names = []
452
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
453
+ :header_params => header_params,
454
+ :query_params => query_params,
455
+ :form_params => form_params,
456
+ :body => post_body,
457
+ :auth_names => auth_names,
458
+ :return_type => 'UserAccountSerializer')
459
+ if @api_client.config.debugging
460
+ @api_client.config.logger.debug "API called: UsersApi#account_user_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
461
+ end
462
+ return data, status_code, headers
463
+ end
464
+
465
+ # View to create new platforms on which the user is an admin
466
+ # 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.
467
+ # @param user_pk
468
+ # @param name
469
+ # @param [Hash] opts the optional parameters
470
+ # @return [PlatformSummarySerializer]
471
+ def admin_platform_create(user_pk, name, opts = {})
472
+ data, _status_code, _headers = admin_platform_create_with_http_info(user_pk, name, opts)
473
+ return data
474
+ end
475
+
476
+ # View to create new platforms on which the user is an admin
477
+ # 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.
478
+ # @param user_pk
479
+ # @param name
480
+ # @param [Hash] opts the optional parameters
481
+ # @return [Array<(PlatformSummarySerializer, Fixnum, Hash)>] PlatformSummarySerializer data, response status code and response headers
482
+ def admin_platform_create_with_http_info(user_pk, name, opts = {})
483
+ if @api_client.config.debugging
484
+ @api_client.config.logger.debug "Calling API: UsersApi.admin_platform_create ..."
485
+ end
486
+ # verify the required parameter 'user_pk' is set
487
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.admin_platform_create" if user_pk.nil?
488
+ # verify the required parameter 'name' is set
489
+ fail ArgumentError, "Missing the required parameter 'name' when calling UsersApi.admin_platform_create" if name.nil?
490
+ # resource path
491
+ local_var_path = "/users/{user_pk}/administered_platforms/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
492
+
493
+ # query parameters
494
+ query_params = {}
495
+
496
+ # header parameters
497
+ header_params = {}
498
+
499
+ # HTTP header 'Accept' (if needed)
500
+ local_header_accept = []
501
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
502
+
503
+ # HTTP header 'Content-Type'
504
+ local_header_content_type = []
505
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
506
+
507
+ # form parameters
508
+ form_params = {}
509
+ form_params["name"] = name
510
+
511
+ # http body (model)
512
+ post_body = nil
513
+ auth_names = []
514
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
515
+ :header_params => header_params,
516
+ :query_params => query_params,
517
+ :form_params => form_params,
518
+ :body => post_body,
519
+ :auth_names => auth_names,
520
+ :return_type => 'PlatformSummarySerializer')
521
+ if @api_client.config.debugging
522
+ @api_client.config.logger.debug "API called: UsersApi#admin_platform_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
523
+ end
524
+ return data, status_code, headers
525
+ end
526
+
527
+ # On GET, cancel the income request
528
+ # 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.
529
+ # @param user_pk
530
+ # @param pk
531
+ # @param [Hash] opts the optional parameters
532
+ # @return [Object]
533
+ def cancel_income_request_get(user_pk, pk, opts = {})
534
+ data, _status_code, _headers = cancel_income_request_get_with_http_info(user_pk, pk, opts)
535
+ return data
536
+ end
537
+
538
+ # On GET, cancel the income request
539
+ # 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.
540
+ # @param user_pk
541
+ # @param pk
542
+ # @param [Hash] opts the optional parameters
543
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
544
+ def cancel_income_request_get_with_http_info(user_pk, pk, opts = {})
545
+ if @api_client.config.debugging
546
+ @api_client.config.logger.debug "Calling API: UsersApi.cancel_income_request_get ..."
547
+ end
548
+ # verify the required parameter 'user_pk' is set
549
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cancel_income_request_get" if user_pk.nil?
550
+ # verify the required parameter 'pk' is set
551
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.cancel_income_request_get" if pk.nil?
552
+ # resource path
553
+ 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)
554
+
555
+ # query parameters
556
+ query_params = {}
557
+
558
+ # header parameters
559
+ header_params = {}
560
+
561
+ # HTTP header 'Accept' (if needed)
562
+ local_header_accept = []
563
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
564
+
565
+ # HTTP header 'Content-Type'
566
+ local_header_content_type = []
567
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
568
+
569
+ # form parameters
570
+ form_params = {}
571
+
572
+ # http body (model)
573
+ post_body = nil
574
+ auth_names = []
575
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
576
+ :header_params => header_params,
577
+ :query_params => query_params,
578
+ :form_params => form_params,
579
+ :body => post_body,
580
+ :auth_names => auth_names,
581
+ :return_type => 'Object')
582
+ if @api_client.config.debugging
583
+ @api_client.config.logger.debug "API called: UsersApi#cancel_income_request_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
584
+ end
585
+ return data, status_code, headers
586
+ end
587
+
588
+ # On POST, cancel the income request
589
+ # View to offer a ./cancel endpoint for cancelling an IncomeRequest. <br/>On POST, cancel the income request.
590
+ # @param user_pk
591
+ # @param pk
592
+ # @param [Hash] opts the optional parameters
593
+ # @return [Object]
594
+ def cancel_income_request_post(user_pk, pk, opts = {})
595
+ data, _status_code, _headers = cancel_income_request_post_with_http_info(user_pk, pk, opts)
596
+ return data
597
+ end
598
+
599
+ # On POST, cancel the income request
600
+ # View to offer a ./cancel endpoint for cancelling an IncomeRequest. &lt;br/&gt;On POST, cancel the income request.
601
+ # @param user_pk
602
+ # @param pk
603
+ # @param [Hash] opts the optional parameters
604
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
605
+ def cancel_income_request_post_with_http_info(user_pk, pk, opts = {})
606
+ if @api_client.config.debugging
607
+ @api_client.config.logger.debug "Calling API: UsersApi.cancel_income_request_post ..."
608
+ end
609
+ # verify the required parameter 'user_pk' is set
610
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cancel_income_request_post" if user_pk.nil?
611
+ # verify the required parameter 'pk' is set
612
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.cancel_income_request_post" if pk.nil?
613
+ # resource path
614
+ 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)
615
+
616
+ # query parameters
617
+ query_params = {}
618
+
619
+ # header parameters
620
+ header_params = {}
621
+
622
+ # HTTP header 'Accept' (if needed)
623
+ local_header_accept = []
624
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
625
+
626
+ # HTTP header 'Content-Type'
627
+ local_header_content_type = []
628
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
629
+
630
+ # form parameters
631
+ form_params = {}
632
+
633
+ # http body (model)
634
+ post_body = nil
635
+ auth_names = []
636
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
637
+ :header_params => header_params,
638
+ :query_params => query_params,
639
+ :form_params => form_params,
640
+ :body => post_body,
641
+ :auth_names => auth_names,
642
+ :return_type => 'Object')
643
+ if @api_client.config.debugging
644
+ @api_client.config.logger.debug "API called: UsersApi#cancel_income_request_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
645
+ end
646
+ return data, status_code, headers
647
+ end
648
+
649
+ # On GET, cancel the membership request
650
+ # 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.
651
+ # @param user_pk
652
+ # @param pk
653
+ # @param [Hash] opts the optional parameters
654
+ # @return [Object]
655
+ def cancel_platform_membership_request_get(user_pk, pk, opts = {})
656
+ data, _status_code, _headers = cancel_platform_membership_request_get_with_http_info(user_pk, pk, opts)
657
+ return data
658
+ end
659
+
660
+ # On GET, cancel the membership request
661
+ # 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.
662
+ # @param user_pk
663
+ # @param pk
664
+ # @param [Hash] opts the optional parameters
665
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
666
+ def cancel_platform_membership_request_get_with_http_info(user_pk, pk, opts = {})
667
+ if @api_client.config.debugging
668
+ @api_client.config.logger.debug "Calling API: UsersApi.cancel_platform_membership_request_get ..."
669
+ end
670
+ # verify the required parameter 'user_pk' is set
671
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cancel_platform_membership_request_get" if user_pk.nil?
672
+ # verify the required parameter 'pk' is set
673
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.cancel_platform_membership_request_get" if pk.nil?
674
+ # resource path
675
+ 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)
676
+
677
+ # query parameters
678
+ query_params = {}
679
+
680
+ # header parameters
681
+ header_params = {}
682
+
683
+ # HTTP header 'Accept' (if needed)
684
+ local_header_accept = []
685
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
686
+
687
+ # HTTP header 'Content-Type'
688
+ local_header_content_type = []
689
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
690
+
691
+ # form parameters
692
+ form_params = {}
693
+
694
+ # http body (model)
695
+ post_body = nil
696
+ auth_names = []
697
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
698
+ :header_params => header_params,
699
+ :query_params => query_params,
700
+ :form_params => form_params,
701
+ :body => post_body,
702
+ :auth_names => auth_names,
703
+ :return_type => 'Object')
704
+ if @api_client.config.debugging
705
+ @api_client.config.logger.debug "API called: UsersApi#cancel_platform_membership_request_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
706
+ end
707
+ return data, status_code, headers
708
+ end
709
+
710
+ # On POST, cancel the membership request
711
+ # View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. <br/>On POST, cancel the membership request.
712
+ # @param user_pk
713
+ # @param pk
714
+ # @param [Hash] opts the optional parameters
715
+ # @return [Object]
716
+ def cancel_platform_membership_request_post(user_pk, pk, opts = {})
717
+ data, _status_code, _headers = cancel_platform_membership_request_post_with_http_info(user_pk, pk, opts)
718
+ return data
719
+ end
720
+
721
+ # On POST, cancel the membership request
722
+ # View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. &lt;br/&gt;On POST, cancel the membership request.
723
+ # @param user_pk
724
+ # @param pk
725
+ # @param [Hash] opts the optional parameters
726
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
727
+ def cancel_platform_membership_request_post_with_http_info(user_pk, pk, opts = {})
728
+ if @api_client.config.debugging
729
+ @api_client.config.logger.debug "Calling API: UsersApi.cancel_platform_membership_request_post ..."
730
+ end
731
+ # verify the required parameter 'user_pk' is set
732
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cancel_platform_membership_request_post" if user_pk.nil?
733
+ # verify the required parameter 'pk' is set
734
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.cancel_platform_membership_request_post" if pk.nil?
735
+ # resource path
736
+ 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)
737
+
738
+ # query parameters
739
+ query_params = {}
740
+
741
+ # header parameters
742
+ header_params = {}
743
+
744
+ # HTTP header 'Accept' (if needed)
745
+ local_header_accept = []
746
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
747
+
748
+ # HTTP header 'Content-Type'
749
+ local_header_content_type = []
750
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
751
+
752
+ # form parameters
753
+ form_params = {}
754
+
755
+ # http body (model)
756
+ post_body = nil
757
+ auth_names = []
758
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
759
+ :header_params => header_params,
760
+ :query_params => query_params,
761
+ :form_params => form_params,
762
+ :body => post_body,
763
+ :auth_names => auth_names,
764
+ :return_type => 'Object')
765
+ if @api_client.config.debugging
766
+ @api_client.config.logger.debug "API called: UsersApi#cancel_platform_membership_request_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
767
+ end
768
+ return data, status_code, headers
769
+ end
770
+
771
+ # Calculate the fees for a specific Cashout amount
772
+ # Calculate the fees for a specific Cashout amount.<br/>This returns the fees for a specific cashout amount, plus the maximum amount available.
773
+ # @param user_pk
774
+ # @param [Hash] opts the optional parameters
775
+ # @option opts [String] :amount The Cashout amount to calculate fees for. (This amount is net, i.e. before fees).
776
+ # @return [CashoutCalculationSerializer]
777
+ def cashout_available_create(user_pk, opts = {})
778
+ data, _status_code, _headers = cashout_available_create_with_http_info(user_pk, opts)
779
+ return data
780
+ end
781
+
782
+ # Calculate the fees for a specific Cashout amount
783
+ # 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.
784
+ # @param user_pk
785
+ # @param [Hash] opts the optional parameters
786
+ # @option opts [String] :amount The Cashout amount to calculate fees for. (This amount is net, i.e. before fees).
787
+ # @return [Array<(CashoutCalculationSerializer, Fixnum, Hash)>] CashoutCalculationSerializer data, response status code and response headers
788
+ def cashout_available_create_with_http_info(user_pk, opts = {})
789
+ if @api_client.config.debugging
790
+ @api_client.config.logger.debug "Calling API: UsersApi.cashout_available_create ..."
791
+ end
792
+ # verify the required parameter 'user_pk' is set
793
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cashout_available_create" if user_pk.nil?
794
+ # resource path
795
+ local_var_path = "/users/{user_pk}/cashout_available/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
796
+
797
+ # query parameters
798
+ query_params = {}
799
+
800
+ # header parameters
801
+ header_params = {}
802
+
803
+ # HTTP header 'Accept' (if needed)
804
+ local_header_accept = []
805
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
806
+
807
+ # HTTP header 'Content-Type'
808
+ local_header_content_type = []
809
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
810
+
811
+ # form parameters
812
+ form_params = {}
813
+ form_params["amount"] = opts[:'amount'] if !opts[:'amount'].nil?
814
+
815
+ # http body (model)
816
+ post_body = nil
817
+ auth_names = []
818
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
819
+ :header_params => header_params,
820
+ :query_params => query_params,
821
+ :form_params => form_params,
822
+ :body => post_body,
823
+ :auth_names => auth_names,
824
+ :return_type => 'CashoutCalculationSerializer')
825
+ if @api_client.config.debugging
826
+ @api_client.config.logger.debug "API called: UsersApi#cashout_available_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
827
+ end
828
+ return data, status_code, headers
829
+ end
830
+
831
+ # Calculate the available cashout for a User
832
+ # Calculate the available cashout for a User.<br/>This returns the maximum cashout amount available, and the fee for that amount.
833
+ # @param user_pk
834
+ # @param [Hash] opts the optional parameters
835
+ # @return [CashoutCalculationSerializer]
836
+ def cashout_available_retrieve(user_pk, opts = {})
837
+ data, _status_code, _headers = cashout_available_retrieve_with_http_info(user_pk, opts)
838
+ return data
839
+ end
840
+
841
+ # Calculate the available cashout for a User
842
+ # Calculate the available cashout for a User.&lt;br/&gt;This returns the maximum cashout amount available, and the fee for that amount.
843
+ # @param user_pk
844
+ # @param [Hash] opts the optional parameters
845
+ # @return [Array<(CashoutCalculationSerializer, Fixnum, Hash)>] CashoutCalculationSerializer data, response status code and response headers
846
+ def cashout_available_retrieve_with_http_info(user_pk, opts = {})
847
+ if @api_client.config.debugging
848
+ @api_client.config.logger.debug "Calling API: UsersApi.cashout_available_retrieve ..."
849
+ end
850
+ # verify the required parameter 'user_pk' is set
851
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cashout_available_retrieve" if user_pk.nil?
852
+ # resource path
853
+ local_var_path = "/users/{user_pk}/cashout_available/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
854
+
855
+ # query parameters
856
+ query_params = {}
857
+
858
+ # header parameters
859
+ header_params = {}
860
+
861
+ # HTTP header 'Accept' (if needed)
862
+ local_header_accept = []
863
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
864
+
865
+ # HTTP header 'Content-Type'
866
+ local_header_content_type = []
867
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
868
+
869
+ # form parameters
870
+ form_params = {}
871
+
872
+ # http body (model)
873
+ post_body = nil
874
+ auth_names = []
875
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
876
+ :header_params => header_params,
877
+ :query_params => query_params,
878
+ :form_params => form_params,
879
+ :body => post_body,
880
+ :auth_names => auth_names,
881
+ :return_type => 'CashoutCalculationSerializer')
882
+ if @api_client.config.debugging
883
+ @api_client.config.logger.debug "API called: UsersApi#cashout_available_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
884
+ end
885
+ return data, status_code, headers
886
+ end
887
+
888
+ # The Cashouts for a specific User
889
+ # The Cashouts for a specific User. Enables create, retrieve, list.
890
+ # @param user_pk
891
+ # @param amount
892
+ # @param [Hash] opts the optional parameters
893
+ # @option opts [DateTime] :cashout_time
894
+ # @option opts [String] :notes
895
+ # @option opts [String] :type
896
+ # @option opts [String] :method
897
+ # @option opts [DateTime] :transmit_time
898
+ # @option opts [String] :rebate The Rebate against which this Cashout will be collected.
899
+ # @option opts [String] :account
900
+ # @return [UserCashoutSerializer]
901
+ def cashout_user_viewset_create(user_pk, amount, opts = {})
902
+ data, _status_code, _headers = cashout_user_viewset_create_with_http_info(user_pk, amount, opts)
903
+ return data
904
+ end
905
+
906
+ # The Cashouts for a specific User
907
+ # The Cashouts for a specific User. Enables create, retrieve, list.
908
+ # @param user_pk
909
+ # @param amount
910
+ # @param [Hash] opts the optional parameters
911
+ # @option opts [DateTime] :cashout_time
912
+ # @option opts [String] :notes
913
+ # @option opts [String] :type
914
+ # @option opts [String] :method
915
+ # @option opts [DateTime] :transmit_time
916
+ # @option opts [String] :rebate The Rebate against which this Cashout will be collected.
917
+ # @option opts [String] :account
918
+ # @return [Array<(UserCashoutSerializer, Fixnum, Hash)>] UserCashoutSerializer data, response status code and response headers
919
+ def cashout_user_viewset_create_with_http_info(user_pk, amount, opts = {})
920
+ if @api_client.config.debugging
921
+ @api_client.config.logger.debug "Calling API: UsersApi.cashout_user_viewset_create ..."
922
+ end
923
+ # verify the required parameter 'user_pk' is set
924
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cashout_user_viewset_create" if user_pk.nil?
925
+ # verify the required parameter 'amount' is set
926
+ fail ArgumentError, "Missing the required parameter 'amount' when calling UsersApi.cashout_user_viewset_create" if amount.nil?
927
+ if opts[:'type'] && !['CASHOUT', 'DEBIT', 'REBATE'].include?(opts[:'type'])
928
+ fail ArgumentError, 'invalid value for "type", must be one of CASHOUT, DEBIT, REBATE'
929
+ end
930
+ if opts[:'method'] && !['ACH', 'CHECK', 'WIRE', 'PAYPAL'].include?(opts[:'method'])
931
+ fail ArgumentError, 'invalid value for "method", must be one of ACH, CHECK, WIRE, PAYPAL'
932
+ end
933
+ # resource path
934
+ local_var_path = "/users/{user_pk}/cashouts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
935
+
936
+ # query parameters
937
+ query_params = {}
938
+
939
+ # header parameters
940
+ header_params = {}
941
+
942
+ # HTTP header 'Accept' (if needed)
943
+ local_header_accept = []
944
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
945
+
946
+ # HTTP header 'Content-Type'
947
+ local_header_content_type = []
948
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
949
+
950
+ # form parameters
951
+ form_params = {}
952
+ form_params["amount"] = amount
953
+ form_params["cashout_time"] = opts[:'cashout_time'] if !opts[:'cashout_time'].nil?
954
+ form_params["notes"] = opts[:'notes'] if !opts[:'notes'].nil?
955
+ form_params["type"] = opts[:'type'] if !opts[:'type'].nil?
956
+ form_params["method"] = opts[:'method'] if !opts[:'method'].nil?
957
+ form_params["transmit_time"] = opts[:'transmit_time'] if !opts[:'transmit_time'].nil?
958
+ form_params["rebate"] = opts[:'rebate'] if !opts[:'rebate'].nil?
959
+ form_params["account"] = opts[:'account'] if !opts[:'account'].nil?
960
+
961
+ # http body (model)
962
+ post_body = nil
963
+ auth_names = []
964
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
965
+ :header_params => header_params,
966
+ :query_params => query_params,
967
+ :form_params => form_params,
968
+ :body => post_body,
969
+ :auth_names => auth_names,
970
+ :return_type => 'UserCashoutSerializer')
971
+ if @api_client.config.debugging
972
+ @api_client.config.logger.debug "API called: UsersApi#cashout_user_viewset_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
973
+ end
974
+ return data, status_code, headers
975
+ end
976
+
977
+ # The Cashouts for a specific User
978
+ # The Cashouts for a specific User. Enables create, retrieve, list.
979
+ # @param user_pk
980
+ # @param [Hash] opts the optional parameters
981
+ # @return [Array<UserCashoutSerializer>]
982
+ def cashout_user_viewset_list(user_pk, opts = {})
983
+ data, _status_code, _headers = cashout_user_viewset_list_with_http_info(user_pk, opts)
984
+ return data
985
+ end
986
+
987
+ # The Cashouts for a specific User
988
+ # The Cashouts for a specific User. Enables create, retrieve, list.
989
+ # @param user_pk
990
+ # @param [Hash] opts the optional parameters
991
+ # @return [Array<(Array<UserCashoutSerializer>, Fixnum, Hash)>] Array<UserCashoutSerializer> data, response status code and response headers
992
+ def cashout_user_viewset_list_with_http_info(user_pk, opts = {})
993
+ if @api_client.config.debugging
994
+ @api_client.config.logger.debug "Calling API: UsersApi.cashout_user_viewset_list ..."
995
+ end
996
+ # verify the required parameter 'user_pk' is set
997
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cashout_user_viewset_list" if user_pk.nil?
998
+ # resource path
999
+ local_var_path = "/users/{user_pk}/cashouts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
1000
+
1001
+ # query parameters
1002
+ query_params = {}
1003
+
1004
+ # header parameters
1005
+ header_params = {}
1006
+
1007
+ # HTTP header 'Accept' (if needed)
1008
+ local_header_accept = []
1009
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1010
+
1011
+ # HTTP header 'Content-Type'
1012
+ local_header_content_type = []
1013
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1014
+
1015
+ # form parameters
1016
+ form_params = {}
1017
+
1018
+ # http body (model)
1019
+ post_body = nil
1020
+ auth_names = []
1021
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1022
+ :header_params => header_params,
1023
+ :query_params => query_params,
1024
+ :form_params => form_params,
1025
+ :body => post_body,
1026
+ :auth_names => auth_names,
1027
+ :return_type => 'Array<UserCashoutSerializer>')
1028
+ if @api_client.config.debugging
1029
+ @api_client.config.logger.debug "API called: UsersApi#cashout_user_viewset_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1030
+ end
1031
+ return data, status_code, headers
1032
+ end
1033
+
1034
+ # The Cashouts for a specific User
1035
+ # The Cashouts for a specific User. Enables create, retrieve, list.
1036
+ # @param user_pk
1037
+ # @param pk
1038
+ # @param [Hash] opts the optional parameters
1039
+ # @return [UserCashoutSerializer]
1040
+ def cashout_user_viewset_retrieve(user_pk, pk, opts = {})
1041
+ data, _status_code, _headers = cashout_user_viewset_retrieve_with_http_info(user_pk, pk, opts)
1042
+ return data
1043
+ end
1044
+
1045
+ # The Cashouts for a specific User
1046
+ # The Cashouts for a specific User. Enables create, retrieve, list.
1047
+ # @param user_pk
1048
+ # @param pk
1049
+ # @param [Hash] opts the optional parameters
1050
+ # @return [Array<(UserCashoutSerializer, Fixnum, Hash)>] UserCashoutSerializer data, response status code and response headers
1051
+ def cashout_user_viewset_retrieve_with_http_info(user_pk, pk, opts = {})
1052
+ if @api_client.config.debugging
1053
+ @api_client.config.logger.debug "Calling API: UsersApi.cashout_user_viewset_retrieve ..."
1054
+ end
1055
+ # verify the required parameter 'user_pk' is set
1056
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cashout_user_viewset_retrieve" if user_pk.nil?
1057
+ # verify the required parameter 'pk' is set
1058
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.cashout_user_viewset_retrieve" if pk.nil?
1059
+ # resource path
1060
+ local_var_path = "/users/{user_pk}/cashouts/{pk}/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)
1061
+
1062
+ # query parameters
1063
+ query_params = {}
1064
+
1065
+ # header parameters
1066
+ header_params = {}
1067
+
1068
+ # HTTP header 'Accept' (if needed)
1069
+ local_header_accept = []
1070
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1071
+
1072
+ # HTTP header 'Content-Type'
1073
+ local_header_content_type = []
1074
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1075
+
1076
+ # form parameters
1077
+ form_params = {}
1078
+
1079
+ # http body (model)
1080
+ post_body = nil
1081
+ auth_names = []
1082
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1083
+ :header_params => header_params,
1084
+ :query_params => query_params,
1085
+ :form_params => form_params,
1086
+ :body => post_body,
1087
+ :auth_names => auth_names,
1088
+ :return_type => 'UserCashoutSerializer')
1089
+ if @api_client.config.debugging
1090
+ @api_client.config.logger.debug "API called: UsersApi#cashout_user_viewset_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1091
+ end
1092
+ return data, status_code, headers
1093
+ end
1094
+
1095
+ # The list of Income items for a specific User
1096
+ # 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.
1097
+ # @param user_pk
1098
+ # @param [Hash] opts the optional parameters
1099
+ # @return [Array<IncomeSerializerFixedSource>]
1100
+ def income_user_list(user_pk, opts = {})
1101
+ data, _status_code, _headers = income_user_list_with_http_info(user_pk, opts)
1102
+ return data
1103
+ end
1104
+
1105
+ # The list of Income items for a specific User
1106
+ # 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.
1107
+ # @param user_pk
1108
+ # @param [Hash] opts the optional parameters
1109
+ # @return [Array<(Array<IncomeSerializerFixedSource>, Fixnum, Hash)>] Array<IncomeSerializerFixedSource> data, response status code and response headers
1110
+ def income_user_list_with_http_info(user_pk, opts = {})
1111
+ if @api_client.config.debugging
1112
+ @api_client.config.logger.debug "Calling API: UsersApi.income_user_list ..."
1113
+ end
1114
+ # verify the required parameter 'user_pk' is set
1115
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.income_user_list" if user_pk.nil?
1116
+ # resource path
1117
+ local_var_path = "/users/{user_pk}/income/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
1118
+
1119
+ # query parameters
1120
+ query_params = {}
1121
+
1122
+ # header parameters
1123
+ header_params = {}
1124
+
1125
+ # HTTP header 'Accept' (if needed)
1126
+ local_header_accept = []
1127
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1128
+
1129
+ # HTTP header 'Content-Type'
1130
+ local_header_content_type = []
1131
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1132
+
1133
+ # form parameters
1134
+ form_params = {}
1135
+
1136
+ # http body (model)
1137
+ post_body = nil
1138
+ auth_names = []
1139
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1140
+ :header_params => header_params,
1141
+ :query_params => query_params,
1142
+ :form_params => form_params,
1143
+ :body => post_body,
1144
+ :auth_names => auth_names,
1145
+ :return_type => 'Array<IncomeSerializerFixedSource>')
1146
+ if @api_client.config.debugging
1147
+ @api_client.config.logger.debug "API called: UsersApi#income_user_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1148
+ end
1149
+ return data, status_code, headers
1150
+ end
1151
+
1152
+ # The currently logged in User
1153
+ # The currently logged in User.
1154
+ # @param [Hash] opts the optional parameters
1155
+ # @option opts [String] :email
1156
+ # @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company.
1157
+ # @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company.
1158
+ # @option opts [String] :business_name Business name. Only use this field if this user is a business entity.
1159
+ # @option opts [String] :contractor_type (default to INDIVIDUAL)
1160
+ # @option opts [String] :default_account Default account to use for payment of unpaid income.
1161
+ # @option opts [String] :tax_savings_account Account to use for tax savings.
1162
+ # @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes.
1163
+ # @option opts [BOOLEAN] :use_plaid Feature flag specifying if Plaid integration should be used.
1164
+ # @option opts [BOOLEAN] :use_income_requests Feature flag specifying if IncomeRequests should be enabled for this user.
1165
+ # @option opts [BOOLEAN] :use_tax_savings Feature flag specifying if tax savings should be enabled.
1166
+ # @option opts [BOOLEAN] :is_auto_cashout_enabled Whether or not all income should be immediately cashed out for this user.
1167
+ # @option opts [String] :password
1168
+ # @option opts [String] :personal_information
1169
+ # @return [UserSerializer]
1170
+ def my_user_partial_update(opts = {})
1171
+ data, _status_code, _headers = my_user_partial_update_with_http_info(opts)
1172
+ return data
1173
+ end
1174
+
1175
+ # The currently logged in User
1176
+ # The currently logged in User.
1177
+ # @param [Hash] opts the optional parameters
1178
+ # @option opts [String] :email
1179
+ # @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company.
1180
+ # @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company.
1181
+ # @option opts [String] :business_name Business name. Only use this field if this user is a business entity.
1182
+ # @option opts [String] :contractor_type
1183
+ # @option opts [String] :default_account Default account to use for payment of unpaid income.
1184
+ # @option opts [String] :tax_savings_account Account to use for tax savings.
1185
+ # @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes.
1186
+ # @option opts [BOOLEAN] :use_plaid Feature flag specifying if Plaid integration should be used.
1187
+ # @option opts [BOOLEAN] :use_income_requests Feature flag specifying if IncomeRequests should be enabled for this user.
1188
+ # @option opts [BOOLEAN] :use_tax_savings Feature flag specifying if tax savings should be enabled.
1189
+ # @option opts [BOOLEAN] :is_auto_cashout_enabled Whether or not all income should be immediately cashed out for this user.
1190
+ # @option opts [String] :password
1191
+ # @option opts [String] :personal_information
1192
+ # @return [Array<(UserSerializer, Fixnum, Hash)>] UserSerializer data, response status code and response headers
1193
+ def my_user_partial_update_with_http_info(opts = {})
1194
+ if @api_client.config.debugging
1195
+ @api_client.config.logger.debug "Calling API: UsersApi.my_user_partial_update ..."
1196
+ end
1197
+ if opts[:'contractor_type'] && !['INDIVIDUAL', 'BUSINESS'].include?(opts[:'contractor_type'])
1198
+ fail ArgumentError, 'invalid value for "contractor_type", must be one of INDIVIDUAL, BUSINESS'
1199
+ end
1200
+ # resource path
1201
+ local_var_path = "/users/me/".sub('{format}','json')
1202
+
1203
+ # query parameters
1204
+ query_params = {}
1205
+
1206
+ # header parameters
1207
+ header_params = {}
1208
+
1209
+ # HTTP header 'Accept' (if needed)
1210
+ local_header_accept = []
1211
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1212
+
1213
+ # HTTP header 'Content-Type'
1214
+ local_header_content_type = []
1215
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1216
+
1217
+ # form parameters
1218
+ form_params = {}
1219
+ form_params["email"] = opts[:'email'] if !opts[:'email'].nil?
1220
+ form_params["first_name"] = opts[:'first_name'] if !opts[:'first_name'].nil?
1221
+ form_params["last_name"] = opts[:'last_name'] if !opts[:'last_name'].nil?
1222
+ form_params["business_name"] = opts[:'business_name'] if !opts[:'business_name'].nil?
1223
+ form_params["contractor_type"] = opts[:'contractor_type'] if !opts[:'contractor_type'].nil?
1224
+ form_params["default_account"] = opts[:'default_account'] if !opts[:'default_account'].nil?
1225
+ form_params["tax_savings_account"] = opts[:'tax_savings_account'] if !opts[:'tax_savings_account'].nil?
1226
+ form_params["tax_savings_percent"] = opts[:'tax_savings_percent'] if !opts[:'tax_savings_percent'].nil?
1227
+ form_params["use_plaid"] = opts[:'use_plaid'] if !opts[:'use_plaid'].nil?
1228
+ form_params["use_income_requests"] = opts[:'use_income_requests'] if !opts[:'use_income_requests'].nil?
1229
+ form_params["use_tax_savings"] = opts[:'use_tax_savings'] if !opts[:'use_tax_savings'].nil?
1230
+ form_params["is_auto_cashout_enabled"] = opts[:'is_auto_cashout_enabled'] if !opts[:'is_auto_cashout_enabled'].nil?
1231
+ form_params["password"] = opts[:'password'] if !opts[:'password'].nil?
1232
+ form_params["personal_information"] = opts[:'personal_information'] if !opts[:'personal_information'].nil?
1233
+
1234
+ # http body (model)
1235
+ post_body = nil
1236
+ auth_names = []
1237
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
1238
+ :header_params => header_params,
1239
+ :query_params => query_params,
1240
+ :form_params => form_params,
1241
+ :body => post_body,
1242
+ :auth_names => auth_names,
1243
+ :return_type => 'UserSerializer')
1244
+ if @api_client.config.debugging
1245
+ @api_client.config.logger.debug "API called: UsersApi#my_user_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1246
+ end
1247
+ return data, status_code, headers
1248
+ end
1249
+
1250
+ # The currently logged in User
1251
+ # The currently logged in User.
1252
+ # @param [Hash] opts the optional parameters
1253
+ # @return [UserSerializer]
1254
+ def my_user_retrieve(opts = {})
1255
+ data, _status_code, _headers = my_user_retrieve_with_http_info(opts)
1256
+ return data
1257
+ end
1258
+
1259
+ # The currently logged in User
1260
+ # The currently logged in User.
1261
+ # @param [Hash] opts the optional parameters
1262
+ # @return [Array<(UserSerializer, Fixnum, Hash)>] UserSerializer data, response status code and response headers
1263
+ def my_user_retrieve_with_http_info(opts = {})
1264
+ if @api_client.config.debugging
1265
+ @api_client.config.logger.debug "Calling API: UsersApi.my_user_retrieve ..."
1266
+ end
1267
+ # resource path
1268
+ local_var_path = "/users/me/".sub('{format}','json')
1269
+
1270
+ # query parameters
1271
+ query_params = {}
1272
+
1273
+ # header parameters
1274
+ header_params = {}
1275
+
1276
+ # HTTP header 'Accept' (if needed)
1277
+ local_header_accept = []
1278
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1279
+
1280
+ # HTTP header 'Content-Type'
1281
+ local_header_content_type = []
1282
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1283
+
1284
+ # form parameters
1285
+ form_params = {}
1286
+
1287
+ # http body (model)
1288
+ post_body = nil
1289
+ auth_names = []
1290
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1291
+ :header_params => header_params,
1292
+ :query_params => query_params,
1293
+ :form_params => form_params,
1294
+ :body => post_body,
1295
+ :auth_names => auth_names,
1296
+ :return_type => 'UserSerializer')
1297
+ if @api_client.config.debugging
1298
+ @api_client.config.logger.debug "API called: UsersApi#my_user_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1299
+ end
1300
+ return data, status_code, headers
1301
+ end
1302
+
1303
+ # The currently logged in User
1304
+ # The currently logged in User.
1305
+ # @param email
1306
+ # @param [Hash] opts the optional parameters
1307
+ # @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company.
1308
+ # @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company.
1309
+ # @option opts [String] :business_name Business name. Only use this field if this user is a business entity.
1310
+ # @option opts [String] :contractor_type (default to INDIVIDUAL)
1311
+ # @option opts [String] :default_account Default account to use for payment of unpaid income.
1312
+ # @option opts [String] :tax_savings_account Account to use for tax savings.
1313
+ # @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes.
1314
+ # @option opts [BOOLEAN] :use_plaid Feature flag specifying if Plaid integration should be used.
1315
+ # @option opts [BOOLEAN] :use_income_requests Feature flag specifying if IncomeRequests should be enabled for this user.
1316
+ # @option opts [BOOLEAN] :use_tax_savings Feature flag specifying if tax savings should be enabled.
1317
+ # @option opts [BOOLEAN] :is_auto_cashout_enabled Whether or not all income should be immediately cashed out for this user.
1318
+ # @option opts [String] :password
1319
+ # @option opts [String] :personal_information
1320
+ # @return [UserSerializer]
1321
+ def my_user_update(email, opts = {})
1322
+ data, _status_code, _headers = my_user_update_with_http_info(email, opts)
1323
+ return data
1324
+ end
1325
+
1326
+ # The currently logged in User
1327
+ # The currently logged in User.
1328
+ # @param email
1329
+ # @param [Hash] opts the optional parameters
1330
+ # @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company.
1331
+ # @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company.
1332
+ # @option opts [String] :business_name Business name. Only use this field if this user is a business entity.
1333
+ # @option opts [String] :contractor_type
1334
+ # @option opts [String] :default_account Default account to use for payment of unpaid income.
1335
+ # @option opts [String] :tax_savings_account Account to use for tax savings.
1336
+ # @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes.
1337
+ # @option opts [BOOLEAN] :use_plaid Feature flag specifying if Plaid integration should be used.
1338
+ # @option opts [BOOLEAN] :use_income_requests Feature flag specifying if IncomeRequests should be enabled for this user.
1339
+ # @option opts [BOOLEAN] :use_tax_savings Feature flag specifying if tax savings should be enabled.
1340
+ # @option opts [BOOLEAN] :is_auto_cashout_enabled Whether or not all income should be immediately cashed out for this user.
1341
+ # @option opts [String] :password
1342
+ # @option opts [String] :personal_information
1343
+ # @return [Array<(UserSerializer, Fixnum, Hash)>] UserSerializer data, response status code and response headers
1344
+ def my_user_update_with_http_info(email, opts = {})
1345
+ if @api_client.config.debugging
1346
+ @api_client.config.logger.debug "Calling API: UsersApi.my_user_update ..."
1347
+ end
1348
+ # verify the required parameter 'email' is set
1349
+ fail ArgumentError, "Missing the required parameter 'email' when calling UsersApi.my_user_update" if email.nil?
1350
+ if opts[:'contractor_type'] && !['INDIVIDUAL', 'BUSINESS'].include?(opts[:'contractor_type'])
1351
+ fail ArgumentError, 'invalid value for "contractor_type", must be one of INDIVIDUAL, BUSINESS'
1352
+ end
1353
+ # resource path
1354
+ local_var_path = "/users/me/".sub('{format}','json')
1355
+
1356
+ # query parameters
1357
+ query_params = {}
1358
+
1359
+ # header parameters
1360
+ header_params = {}
1361
+
1362
+ # HTTP header 'Accept' (if needed)
1363
+ local_header_accept = []
1364
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1365
+
1366
+ # HTTP header 'Content-Type'
1367
+ local_header_content_type = []
1368
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1369
+
1370
+ # form parameters
1371
+ form_params = {}
1372
+ form_params["email"] = email
1373
+ form_params["first_name"] = opts[:'first_name'] if !opts[:'first_name'].nil?
1374
+ form_params["last_name"] = opts[:'last_name'] if !opts[:'last_name'].nil?
1375
+ form_params["business_name"] = opts[:'business_name'] if !opts[:'business_name'].nil?
1376
+ form_params["contractor_type"] = opts[:'contractor_type'] if !opts[:'contractor_type'].nil?
1377
+ form_params["default_account"] = opts[:'default_account'] if !opts[:'default_account'].nil?
1378
+ form_params["tax_savings_account"] = opts[:'tax_savings_account'] if !opts[:'tax_savings_account'].nil?
1379
+ form_params["tax_savings_percent"] = opts[:'tax_savings_percent'] if !opts[:'tax_savings_percent'].nil?
1380
+ form_params["use_plaid"] = opts[:'use_plaid'] if !opts[:'use_plaid'].nil?
1381
+ form_params["use_income_requests"] = opts[:'use_income_requests'] if !opts[:'use_income_requests'].nil?
1382
+ form_params["use_tax_savings"] = opts[:'use_tax_savings'] if !opts[:'use_tax_savings'].nil?
1383
+ form_params["is_auto_cashout_enabled"] = opts[:'is_auto_cashout_enabled'] if !opts[:'is_auto_cashout_enabled'].nil?
1384
+ form_params["password"] = opts[:'password'] if !opts[:'password'].nil?
1385
+ form_params["personal_information"] = opts[:'personal_information'] if !opts[:'personal_information'].nil?
1386
+
1387
+ # http body (model)
1388
+ post_body = nil
1389
+ auth_names = []
1390
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1391
+ :header_params => header_params,
1392
+ :query_params => query_params,
1393
+ :form_params => form_params,
1394
+ :body => post_body,
1395
+ :auth_names => auth_names,
1396
+ :return_type => 'UserSerializer')
1397
+ if @api_client.config.debugging
1398
+ @api_client.config.logger.debug "API called: UsersApi#my_user_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1399
+ end
1400
+ return data, status_code, headers
1401
+ end
1402
+
1403
+ # Authenticate with Plaid Auth and list the user's accounts
1404
+ # 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.
1405
+ # @param user_pk
1406
+ # @param public_token A public_token generated by authenticating with Plaid Link.
1407
+ # @param [Hash] opts the optional parameters
1408
+ # @return [PlaidPublicTokenSerializer]
1409
+ def plaid_accounts_post(user_pk, public_token, opts = {})
1410
+ data, _status_code, _headers = plaid_accounts_post_with_http_info(user_pk, public_token, opts)
1411
+ return data
1412
+ end
1413
+
1414
+ # Authenticate with Plaid Auth and list the user&#39;s accounts
1415
+ # 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.
1416
+ # @param user_pk
1417
+ # @param public_token A public_token generated by authenticating with Plaid Link.
1418
+ # @param [Hash] opts the optional parameters
1419
+ # @return [Array<(PlaidPublicTokenSerializer, Fixnum, Hash)>] PlaidPublicTokenSerializer data, response status code and response headers
1420
+ def plaid_accounts_post_with_http_info(user_pk, public_token, opts = {})
1421
+ if @api_client.config.debugging
1422
+ @api_client.config.logger.debug "Calling API: UsersApi.plaid_accounts_post ..."
1423
+ end
1424
+ # verify the required parameter 'user_pk' is set
1425
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.plaid_accounts_post" if user_pk.nil?
1426
+ # verify the required parameter 'public_token' is set
1427
+ fail ArgumentError, "Missing the required parameter 'public_token' when calling UsersApi.plaid_accounts_post" if public_token.nil?
1428
+ # resource path
1429
+ local_var_path = "/users/{user_pk}/integrations/plaid/accounts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
1430
+
1431
+ # query parameters
1432
+ query_params = {}
1433
+
1434
+ # header parameters
1435
+ header_params = {}
1436
+
1437
+ # HTTP header 'Accept' (if needed)
1438
+ local_header_accept = []
1439
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1440
+
1441
+ # HTTP header 'Content-Type'
1442
+ local_header_content_type = []
1443
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1444
+
1445
+ # form parameters
1446
+ form_params = {}
1447
+ form_params["public_token"] = public_token
1448
+
1449
+ # http body (model)
1450
+ post_body = nil
1451
+ auth_names = []
1452
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1453
+ :header_params => header_params,
1454
+ :query_params => query_params,
1455
+ :form_params => form_params,
1456
+ :body => post_body,
1457
+ :auth_names => auth_names,
1458
+ :return_type => 'PlaidPublicTokenSerializer')
1459
+ if @api_client.config.debugging
1460
+ @api_client.config.logger.debug "API called: UsersApi#plaid_accounts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1461
+ end
1462
+ return data, status_code, headers
1463
+ end
1464
+
1465
+ # The list of all Receivables for a specific User
1466
+ # 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.
1467
+ # @param user_pk
1468
+ # @param [Hash] opts the optional parameters
1469
+ # @return [ReceivablesSerializer]
1470
+ def receivables_user_api_get(user_pk, opts = {})
1471
+ data, _status_code, _headers = receivables_user_api_get_with_http_info(user_pk, opts)
1472
+ return data
1473
+ end
1474
+
1475
+ # The list of all Receivables for a specific User
1476
+ # 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.
1477
+ # @param user_pk
1478
+ # @param [Hash] opts the optional parameters
1479
+ # @return [Array<(ReceivablesSerializer, Fixnum, Hash)>] ReceivablesSerializer data, response status code and response headers
1480
+ def receivables_user_api_get_with_http_info(user_pk, opts = {})
1481
+ if @api_client.config.debugging
1482
+ @api_client.config.logger.debug "Calling API: UsersApi.receivables_user_api_get ..."
1483
+ end
1484
+ # verify the required parameter 'user_pk' is set
1485
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.receivables_user_api_get" if user_pk.nil?
1486
+ # resource path
1487
+ local_var_path = "/users/{user_pk}/receivables/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
1488
+
1489
+ # query parameters
1490
+ query_params = {}
1491
+
1492
+ # header parameters
1493
+ header_params = {}
1494
+
1495
+ # HTTP header 'Accept' (if needed)
1496
+ local_header_accept = []
1497
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1498
+
1499
+ # HTTP header 'Content-Type'
1500
+ local_header_content_type = []
1501
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1502
+
1503
+ # form parameters
1504
+ form_params = {}
1505
+
1506
+ # http body (model)
1507
+ post_body = nil
1508
+ auth_names = []
1509
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1510
+ :header_params => header_params,
1511
+ :query_params => query_params,
1512
+ :form_params => form_params,
1513
+ :body => post_body,
1514
+ :auth_names => auth_names,
1515
+ :return_type => 'ReceivablesSerializer')
1516
+ if @api_client.config.debugging
1517
+ @api_client.config.logger.debug "API called: UsersApi#receivables_user_api_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1518
+ end
1519
+ return data, status_code, headers
1520
+ end
1521
+
1522
+ # View for handling access to tax savings info for a User
1523
+ # View for handling access to tax savings info for a User.
1524
+ # @param user_pk
1525
+ # @param [Hash] opts the optional parameters
1526
+ # @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes.
1527
+ # @return [TaxSavingsSerializer]
1528
+ def tax_savings_partial_update(user_pk, opts = {})
1529
+ data, _status_code, _headers = tax_savings_partial_update_with_http_info(user_pk, opts)
1530
+ return data
1531
+ end
1532
+
1533
+ # View for handling access to tax savings info for a User
1534
+ # View for handling access to tax savings info for a User.
1535
+ # @param user_pk
1536
+ # @param [Hash] opts the optional parameters
1537
+ # @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes.
1538
+ # @return [Array<(TaxSavingsSerializer, Fixnum, Hash)>] TaxSavingsSerializer data, response status code and response headers
1539
+ def tax_savings_partial_update_with_http_info(user_pk, opts = {})
1540
+ if @api_client.config.debugging
1541
+ @api_client.config.logger.debug "Calling API: UsersApi.tax_savings_partial_update ..."
1542
+ end
1543
+ # verify the required parameter 'user_pk' is set
1544
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.tax_savings_partial_update" if user_pk.nil?
1545
+ # resource path
1546
+ local_var_path = "/users/{user_pk}/tax_savings/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
1547
+
1548
+ # query parameters
1549
+ query_params = {}
1550
+
1551
+ # header parameters
1552
+ header_params = {}
1553
+
1554
+ # HTTP header 'Accept' (if needed)
1555
+ local_header_accept = []
1556
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1557
+
1558
+ # HTTP header 'Content-Type'
1559
+ local_header_content_type = []
1560
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1561
+
1562
+ # form parameters
1563
+ form_params = {}
1564
+ form_params["tax_savings_percent"] = opts[:'tax_savings_percent'] if !opts[:'tax_savings_percent'].nil?
1565
+
1566
+ # http body (model)
1567
+ post_body = nil
1568
+ auth_names = []
1569
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
1570
+ :header_params => header_params,
1571
+ :query_params => query_params,
1572
+ :form_params => form_params,
1573
+ :body => post_body,
1574
+ :auth_names => auth_names,
1575
+ :return_type => 'TaxSavingsSerializer')
1576
+ if @api_client.config.debugging
1577
+ @api_client.config.logger.debug "API called: UsersApi#tax_savings_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1578
+ end
1579
+ return data, status_code, headers
1580
+ end
1581
+
1582
+ # View for handling access to tax savings info for a User
1583
+ # View for handling access to tax savings info for a User.
1584
+ # @param user_pk
1585
+ # @param [Hash] opts the optional parameters
1586
+ # @return [TaxSavingsSerializer]
1587
+ def tax_savings_retrieve(user_pk, opts = {})
1588
+ data, _status_code, _headers = tax_savings_retrieve_with_http_info(user_pk, opts)
1589
+ return data
1590
+ end
1591
+
1592
+ # View for handling access to tax savings info for a User
1593
+ # View for handling access to tax savings info for a User.
1594
+ # @param user_pk
1595
+ # @param [Hash] opts the optional parameters
1596
+ # @return [Array<(TaxSavingsSerializer, Fixnum, Hash)>] TaxSavingsSerializer data, response status code and response headers
1597
+ def tax_savings_retrieve_with_http_info(user_pk, opts = {})
1598
+ if @api_client.config.debugging
1599
+ @api_client.config.logger.debug "Calling API: UsersApi.tax_savings_retrieve ..."
1600
+ end
1601
+ # verify the required parameter 'user_pk' is set
1602
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.tax_savings_retrieve" if user_pk.nil?
1603
+ # resource path
1604
+ local_var_path = "/users/{user_pk}/tax_savings/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
1605
+
1606
+ # query parameters
1607
+ query_params = {}
1608
+
1609
+ # header parameters
1610
+ header_params = {}
1611
+
1612
+ # HTTP header 'Accept' (if needed)
1613
+ local_header_accept = []
1614
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1615
+
1616
+ # HTTP header 'Content-Type'
1617
+ local_header_content_type = []
1618
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1619
+
1620
+ # form parameters
1621
+ form_params = {}
1622
+
1623
+ # http body (model)
1624
+ post_body = nil
1625
+ auth_names = []
1626
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1627
+ :header_params => header_params,
1628
+ :query_params => query_params,
1629
+ :form_params => form_params,
1630
+ :body => post_body,
1631
+ :auth_names => auth_names,
1632
+ :return_type => 'TaxSavingsSerializer')
1633
+ if @api_client.config.debugging
1634
+ @api_client.config.logger.debug "API called: UsersApi#tax_savings_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1635
+ end
1636
+ return data, status_code, headers
1637
+ end
1638
+
1639
+ # View for handling access to tax savings info for a User
1640
+ # View for handling access to tax savings info for a User.
1641
+ # @param user_pk
1642
+ # @param [Hash] opts the optional parameters
1643
+ # @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes.
1644
+ # @return [TaxSavingsSerializer]
1645
+ def tax_savings_update(user_pk, opts = {})
1646
+ data, _status_code, _headers = tax_savings_update_with_http_info(user_pk, opts)
1647
+ return data
1648
+ end
1649
+
1650
+ # View for handling access to tax savings info for a User
1651
+ # View for handling access to tax savings info for a User.
1652
+ # @param user_pk
1653
+ # @param [Hash] opts the optional parameters
1654
+ # @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes.
1655
+ # @return [Array<(TaxSavingsSerializer, Fixnum, Hash)>] TaxSavingsSerializer data, response status code and response headers
1656
+ def tax_savings_update_with_http_info(user_pk, opts = {})
1657
+ if @api_client.config.debugging
1658
+ @api_client.config.logger.debug "Calling API: UsersApi.tax_savings_update ..."
1659
+ end
1660
+ # verify the required parameter 'user_pk' is set
1661
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.tax_savings_update" if user_pk.nil?
1662
+ # resource path
1663
+ local_var_path = "/users/{user_pk}/tax_savings/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
1664
+
1665
+ # query parameters
1666
+ query_params = {}
1667
+
1668
+ # header parameters
1669
+ header_params = {}
1670
+
1671
+ # HTTP header 'Accept' (if needed)
1672
+ local_header_accept = []
1673
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1674
+
1675
+ # HTTP header 'Content-Type'
1676
+ local_header_content_type = []
1677
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1678
+
1679
+ # form parameters
1680
+ form_params = {}
1681
+ form_params["tax_savings_percent"] = opts[:'tax_savings_percent'] if !opts[:'tax_savings_percent'].nil?
1682
+
1683
+ # http body (model)
1684
+ post_body = nil
1685
+ auth_names = []
1686
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1687
+ :header_params => header_params,
1688
+ :query_params => query_params,
1689
+ :form_params => form_params,
1690
+ :body => post_body,
1691
+ :auth_names => auth_names,
1692
+ :return_type => 'TaxSavingsSerializer')
1693
+ if @api_client.config.debugging
1694
+ @api_client.config.logger.debug "API called: UsersApi#tax_savings_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1695
+ end
1696
+ return data, status_code, headers
1697
+ end
1698
+
1699
+ # The list of registered Qwil Users
1700
+ # The list of registered Qwil Users.
1701
+ # @param email
1702
+ # @param [Hash] opts the optional parameters
1703
+ # @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company.
1704
+ # @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company.
1705
+ # @option opts [String] :business_name Business name. Only use this field if this user is a business entity.
1706
+ # @option opts [String] :contractor_type (default to INDIVIDUAL)
1707
+ # @option opts [String] :default_account Default account to use for payment of unpaid income.
1708
+ # @option opts [String] :tax_savings_account Account to use for tax savings.
1709
+ # @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes.
1710
+ # @option opts [BOOLEAN] :use_plaid Feature flag specifying if Plaid integration should be used.
1711
+ # @option opts [BOOLEAN] :use_income_requests Feature flag specifying if IncomeRequests should be enabled for this user.
1712
+ # @option opts [BOOLEAN] :use_tax_savings Feature flag specifying if tax savings should be enabled.
1713
+ # @option opts [BOOLEAN] :is_auto_cashout_enabled Whether or not all income should be immediately cashed out for this user.
1714
+ # @option opts [String] :password
1715
+ # @option opts [String] :personal_information
1716
+ # @return [UserSerializer]
1717
+ def user_create(email, opts = {})
1718
+ data, _status_code, _headers = user_create_with_http_info(email, opts)
1719
+ return data
1720
+ end
1721
+
1722
+ # The list of registered Qwil Users
1723
+ # The list of registered Qwil Users.
1724
+ # @param email
1725
+ # @param [Hash] opts the optional parameters
1726
+ # @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company.
1727
+ # @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company.
1728
+ # @option opts [String] :business_name Business name. Only use this field if this user is a business entity.
1729
+ # @option opts [String] :contractor_type
1730
+ # @option opts [String] :default_account Default account to use for payment of unpaid income.
1731
+ # @option opts [String] :tax_savings_account Account to use for tax savings.
1732
+ # @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes.
1733
+ # @option opts [BOOLEAN] :use_plaid Feature flag specifying if Plaid integration should be used.
1734
+ # @option opts [BOOLEAN] :use_income_requests Feature flag specifying if IncomeRequests should be enabled for this user.
1735
+ # @option opts [BOOLEAN] :use_tax_savings Feature flag specifying if tax savings should be enabled.
1736
+ # @option opts [BOOLEAN] :is_auto_cashout_enabled Whether or not all income should be immediately cashed out for this user.
1737
+ # @option opts [String] :password
1738
+ # @option opts [String] :personal_information
1739
+ # @return [Array<(UserSerializer, Fixnum, Hash)>] UserSerializer data, response status code and response headers
1740
+ def user_create_with_http_info(email, opts = {})
1741
+ if @api_client.config.debugging
1742
+ @api_client.config.logger.debug "Calling API: UsersApi.user_create ..."
1743
+ end
1744
+ # verify the required parameter 'email' is set
1745
+ fail ArgumentError, "Missing the required parameter 'email' when calling UsersApi.user_create" if email.nil?
1746
+ if opts[:'contractor_type'] && !['INDIVIDUAL', 'BUSINESS'].include?(opts[:'contractor_type'])
1747
+ fail ArgumentError, 'invalid value for "contractor_type", must be one of INDIVIDUAL, BUSINESS'
1748
+ end
1749
+ # resource path
1750
+ local_var_path = "/users/".sub('{format}','json')
1751
+
1752
+ # query parameters
1753
+ query_params = {}
1754
+
1755
+ # header parameters
1756
+ header_params = {}
1757
+
1758
+ # HTTP header 'Accept' (if needed)
1759
+ local_header_accept = []
1760
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1761
+
1762
+ # HTTP header 'Content-Type'
1763
+ local_header_content_type = []
1764
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1765
+
1766
+ # form parameters
1767
+ form_params = {}
1768
+ form_params["email"] = email
1769
+ form_params["first_name"] = opts[:'first_name'] if !opts[:'first_name'].nil?
1770
+ form_params["last_name"] = opts[:'last_name'] if !opts[:'last_name'].nil?
1771
+ form_params["business_name"] = opts[:'business_name'] if !opts[:'business_name'].nil?
1772
+ form_params["contractor_type"] = opts[:'contractor_type'] if !opts[:'contractor_type'].nil?
1773
+ form_params["default_account"] = opts[:'default_account'] if !opts[:'default_account'].nil?
1774
+ form_params["tax_savings_account"] = opts[:'tax_savings_account'] if !opts[:'tax_savings_account'].nil?
1775
+ form_params["tax_savings_percent"] = opts[:'tax_savings_percent'] if !opts[:'tax_savings_percent'].nil?
1776
+ form_params["use_plaid"] = opts[:'use_plaid'] if !opts[:'use_plaid'].nil?
1777
+ form_params["use_income_requests"] = opts[:'use_income_requests'] if !opts[:'use_income_requests'].nil?
1778
+ form_params["use_tax_savings"] = opts[:'use_tax_savings'] if !opts[:'use_tax_savings'].nil?
1779
+ form_params["is_auto_cashout_enabled"] = opts[:'is_auto_cashout_enabled'] if !opts[:'is_auto_cashout_enabled'].nil?
1780
+ form_params["password"] = opts[:'password'] if !opts[:'password'].nil?
1781
+ form_params["personal_information"] = opts[:'personal_information'] if !opts[:'personal_information'].nil?
1782
+
1783
+ # http body (model)
1784
+ post_body = nil
1785
+ auth_names = []
1786
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1787
+ :header_params => header_params,
1788
+ :query_params => query_params,
1789
+ :form_params => form_params,
1790
+ :body => post_body,
1791
+ :auth_names => auth_names,
1792
+ :return_type => 'UserSerializer')
1793
+ if @api_client.config.debugging
1794
+ @api_client.config.logger.debug "API called: UsersApi#user_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1795
+ end
1796
+ return data, status_code, headers
1797
+ end
1798
+
1799
+ #
1800
+ #
1801
+ # @param user_pk
1802
+ # @param amount The dollar value of income requested by the User
1803
+ # @param platform The platform that the User is requesting Income from.
1804
+ # @param [Hash] opts the optional parameters
1805
+ # @option opts [String] :note Text visible to the Platform and User describing the Income Request
1806
+ # @return [UserIncomeRequestSerializer]
1807
+ def user_income_request_create(user_pk, amount, platform, opts = {})
1808
+ data, _status_code, _headers = user_income_request_create_with_http_info(user_pk, amount, platform, opts)
1809
+ return data
1810
+ end
1811
+
1812
+ #
1813
+ #
1814
+ # @param user_pk
1815
+ # @param amount The dollar value of income requested by the User
1816
+ # @param platform The platform that the User is requesting Income from.
1817
+ # @param [Hash] opts the optional parameters
1818
+ # @option opts [String] :note Text visible to the Platform and User describing the Income Request
1819
+ # @return [Array<(UserIncomeRequestSerializer, Fixnum, Hash)>] UserIncomeRequestSerializer data, response status code and response headers
1820
+ def user_income_request_create_with_http_info(user_pk, amount, platform, opts = {})
1821
+ if @api_client.config.debugging
1822
+ @api_client.config.logger.debug "Calling API: UsersApi.user_income_request_create ..."
1823
+ end
1824
+ # verify the required parameter 'user_pk' is set
1825
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.user_income_request_create" if user_pk.nil?
1826
+ # verify the required parameter 'amount' is set
1827
+ fail ArgumentError, "Missing the required parameter 'amount' when calling UsersApi.user_income_request_create" if amount.nil?
1828
+ # verify the required parameter 'platform' is set
1829
+ fail ArgumentError, "Missing the required parameter 'platform' when calling UsersApi.user_income_request_create" if platform.nil?
1830
+ # resource path
1831
+ local_var_path = "/users/{user_pk}/income_requests/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
1832
+
1833
+ # query parameters
1834
+ query_params = {}
1835
+
1836
+ # header parameters
1837
+ header_params = {}
1838
+
1839
+ # HTTP header 'Accept' (if needed)
1840
+ local_header_accept = []
1841
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1842
+
1843
+ # HTTP header 'Content-Type'
1844
+ local_header_content_type = []
1845
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1846
+
1847
+ # form parameters
1848
+ form_params = {}
1849
+ form_params["amount"] = amount
1850
+ form_params["platform"] = platform
1851
+ form_params["note"] = opts[:'note'] if !opts[:'note'].nil?
1852
+
1853
+ # http body (model)
1854
+ post_body = nil
1855
+ auth_names = []
1856
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1857
+ :header_params => header_params,
1858
+ :query_params => query_params,
1859
+ :form_params => form_params,
1860
+ :body => post_body,
1861
+ :auth_names => auth_names,
1862
+ :return_type => 'UserIncomeRequestSerializer')
1863
+ if @api_client.config.debugging
1864
+ @api_client.config.logger.debug "API called: UsersApi#user_income_request_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1865
+ end
1866
+ return data, status_code, headers
1867
+ end
1868
+
1869
+ #
1870
+ #
1871
+ # @param user_pk
1872
+ # @param [Hash] opts the optional parameters
1873
+ # @return [Array<UserIncomeRequestSerializer>]
1874
+ def user_income_request_list(user_pk, opts = {})
1875
+ data, _status_code, _headers = user_income_request_list_with_http_info(user_pk, opts)
1876
+ return data
1877
+ end
1878
+
1879
+ #
1880
+ #
1881
+ # @param user_pk
1882
+ # @param [Hash] opts the optional parameters
1883
+ # @return [Array<(Array<UserIncomeRequestSerializer>, Fixnum, Hash)>] Array<UserIncomeRequestSerializer> data, response status code and response headers
1884
+ def user_income_request_list_with_http_info(user_pk, opts = {})
1885
+ if @api_client.config.debugging
1886
+ @api_client.config.logger.debug "Calling API: UsersApi.user_income_request_list ..."
1887
+ end
1888
+ # verify the required parameter 'user_pk' is set
1889
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.user_income_request_list" if user_pk.nil?
1890
+ # resource path
1891
+ local_var_path = "/users/{user_pk}/income_requests/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
1892
+
1893
+ # query parameters
1894
+ query_params = {}
1895
+
1896
+ # header parameters
1897
+ header_params = {}
1898
+
1899
+ # HTTP header 'Accept' (if needed)
1900
+ local_header_accept = []
1901
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1902
+
1903
+ # HTTP header 'Content-Type'
1904
+ local_header_content_type = []
1905
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1906
+
1907
+ # form parameters
1908
+ form_params = {}
1909
+
1910
+ # http body (model)
1911
+ post_body = nil
1912
+ auth_names = []
1913
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1914
+ :header_params => header_params,
1915
+ :query_params => query_params,
1916
+ :form_params => form_params,
1917
+ :body => post_body,
1918
+ :auth_names => auth_names,
1919
+ :return_type => 'Array<UserIncomeRequestSerializer>')
1920
+ if @api_client.config.debugging
1921
+ @api_client.config.logger.debug "API called: UsersApi#user_income_request_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1922
+ end
1923
+ return data, status_code, headers
1924
+ end
1925
+
1926
+ #
1927
+ #
1928
+ # @param user_pk
1929
+ # @param pk
1930
+ # @param [Hash] opts the optional parameters
1931
+ # @return [UserIncomeRequestSerializer]
1932
+ def user_income_request_retrieve(user_pk, pk, opts = {})
1933
+ data, _status_code, _headers = user_income_request_retrieve_with_http_info(user_pk, pk, opts)
1934
+ return data
1935
+ end
1936
+
1937
+ #
1938
+ #
1939
+ # @param user_pk
1940
+ # @param pk
1941
+ # @param [Hash] opts the optional parameters
1942
+ # @return [Array<(UserIncomeRequestSerializer, Fixnum, Hash)>] UserIncomeRequestSerializer data, response status code and response headers
1943
+ def user_income_request_retrieve_with_http_info(user_pk, pk, opts = {})
1944
+ if @api_client.config.debugging
1945
+ @api_client.config.logger.debug "Calling API: UsersApi.user_income_request_retrieve ..."
1946
+ end
1947
+ # verify the required parameter 'user_pk' is set
1948
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.user_income_request_retrieve" if user_pk.nil?
1949
+ # verify the required parameter 'pk' is set
1950
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.user_income_request_retrieve" if pk.nil?
1951
+ # resource path
1952
+ local_var_path = "/users/{user_pk}/income_requests/{pk}/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)
1953
+
1954
+ # query parameters
1955
+ query_params = {}
1956
+
1957
+ # header parameters
1958
+ header_params = {}
1959
+
1960
+ # HTTP header 'Accept' (if needed)
1961
+ local_header_accept = []
1962
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1963
+
1964
+ # HTTP header 'Content-Type'
1965
+ local_header_content_type = []
1966
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1967
+
1968
+ # form parameters
1969
+ form_params = {}
1970
+
1971
+ # http body (model)
1972
+ post_body = nil
1973
+ auth_names = []
1974
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1975
+ :header_params => header_params,
1976
+ :query_params => query_params,
1977
+ :form_params => form_params,
1978
+ :body => post_body,
1979
+ :auth_names => auth_names,
1980
+ :return_type => 'UserIncomeRequestSerializer')
1981
+ if @api_client.config.debugging
1982
+ @api_client.config.logger.debug "API called: UsersApi#user_income_request_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1983
+ end
1984
+ return data, status_code, headers
1985
+ end
1986
+
1987
+ # The list of registered Qwil Users
1988
+ # The list of registered Qwil Users.
1989
+ # @param [Hash] opts the optional parameters
1990
+ # @return [Array<ContractorSerializer>]
1991
+ def user_list(opts = {})
1992
+ data, _status_code, _headers = user_list_with_http_info(opts)
1993
+ return data
1994
+ end
1995
+
1996
+ # The list of registered Qwil Users
1997
+ # The list of registered Qwil Users.
1998
+ # @param [Hash] opts the optional parameters
1999
+ # @return [Array<(Array<ContractorSerializer>, Fixnum, Hash)>] Array<ContractorSerializer> data, response status code and response headers
2000
+ def user_list_with_http_info(opts = {})
2001
+ if @api_client.config.debugging
2002
+ @api_client.config.logger.debug "Calling API: UsersApi.user_list ..."
2003
+ end
2004
+ # resource path
2005
+ local_var_path = "/users/".sub('{format}','json')
2006
+
2007
+ # query parameters
2008
+ query_params = {}
2009
+
2010
+ # header parameters
2011
+ header_params = {}
2012
+
2013
+ # HTTP header 'Accept' (if needed)
2014
+ local_header_accept = []
2015
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2016
+
2017
+ # HTTP header 'Content-Type'
2018
+ local_header_content_type = []
2019
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2020
+
2021
+ # form parameters
2022
+ form_params = {}
2023
+
2024
+ # http body (model)
2025
+ post_body = nil
2026
+ auth_names = []
2027
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2028
+ :header_params => header_params,
2029
+ :query_params => query_params,
2030
+ :form_params => form_params,
2031
+ :body => post_body,
2032
+ :auth_names => auth_names,
2033
+ :return_type => 'Array<ContractorSerializer>')
2034
+ if @api_client.config.debugging
2035
+ @api_client.config.logger.debug "API called: UsersApi#user_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2036
+ end
2037
+ return data, status_code, headers
2038
+ end
2039
+
2040
+ # The list of registered Qwil Users
2041
+ # The list of registered Qwil Users.
2042
+ # @param pk
2043
+ # @param [Hash] opts the optional parameters
2044
+ # @option opts [String] :email
2045
+ # @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company.
2046
+ # @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company.
2047
+ # @option opts [String] :business_name Business name. Only use this field if this user is a business entity.
2048
+ # @option opts [String] :contractor_type (default to INDIVIDUAL)
2049
+ # @option opts [String] :personal_information
2050
+ # @option opts [String] :default_account Default account to use for payment of unpaid income.
2051
+ # @return [ContractorSerializer]
2052
+ def user_partial_update(pk, opts = {})
2053
+ data, _status_code, _headers = user_partial_update_with_http_info(pk, opts)
2054
+ return data
2055
+ end
2056
+
2057
+ # The list of registered Qwil Users
2058
+ # The list of registered Qwil Users.
2059
+ # @param pk
2060
+ # @param [Hash] opts the optional parameters
2061
+ # @option opts [String] :email
2062
+ # @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company.
2063
+ # @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company.
2064
+ # @option opts [String] :business_name Business name. Only use this field if this user is a business entity.
2065
+ # @option opts [String] :contractor_type
2066
+ # @option opts [String] :personal_information
2067
+ # @option opts [String] :default_account Default account to use for payment of unpaid income.
2068
+ # @return [Array<(ContractorSerializer, Fixnum, Hash)>] ContractorSerializer data, response status code and response headers
2069
+ def user_partial_update_with_http_info(pk, opts = {})
2070
+ if @api_client.config.debugging
2071
+ @api_client.config.logger.debug "Calling API: UsersApi.user_partial_update ..."
2072
+ end
2073
+ # verify the required parameter 'pk' is set
2074
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.user_partial_update" if pk.nil?
2075
+ if opts[:'contractor_type'] && !['INDIVIDUAL', 'BUSINESS'].include?(opts[:'contractor_type'])
2076
+ fail ArgumentError, 'invalid value for "contractor_type", must be one of INDIVIDUAL, BUSINESS'
2077
+ end
2078
+ # resource path
2079
+ local_var_path = "/users/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s)
2080
+
2081
+ # query parameters
2082
+ query_params = {}
2083
+
2084
+ # header parameters
2085
+ header_params = {}
2086
+
2087
+ # HTTP header 'Accept' (if needed)
2088
+ local_header_accept = []
2089
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2090
+
2091
+ # HTTP header 'Content-Type'
2092
+ local_header_content_type = []
2093
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2094
+
2095
+ # form parameters
2096
+ form_params = {}
2097
+ form_params["email"] = opts[:'email'] if !opts[:'email'].nil?
2098
+ form_params["first_name"] = opts[:'first_name'] if !opts[:'first_name'].nil?
2099
+ form_params["last_name"] = opts[:'last_name'] if !opts[:'last_name'].nil?
2100
+ form_params["business_name"] = opts[:'business_name'] if !opts[:'business_name'].nil?
2101
+ form_params["contractor_type"] = opts[:'contractor_type'] if !opts[:'contractor_type'].nil?
2102
+ form_params["personal_information"] = opts[:'personal_information'] if !opts[:'personal_information'].nil?
2103
+ form_params["default_account"] = opts[:'default_account'] if !opts[:'default_account'].nil?
2104
+
2105
+ # http body (model)
2106
+ post_body = nil
2107
+ auth_names = []
2108
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
2109
+ :header_params => header_params,
2110
+ :query_params => query_params,
2111
+ :form_params => form_params,
2112
+ :body => post_body,
2113
+ :auth_names => auth_names,
2114
+ :return_type => 'ContractorSerializer')
2115
+ if @api_client.config.debugging
2116
+ @api_client.config.logger.debug "API called: UsersApi#user_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2117
+ end
2118
+ return data, status_code, headers
2119
+ end
2120
+
2121
+ #
2122
+ #
2123
+ # @param user_pk
2124
+ # @param platform The platform that the User requests to join.
2125
+ # @param [Hash] opts the optional parameters
2126
+ # @option opts [String] :decision_maker
2127
+ # @return [UserPlatformMembershipRequestSerializer]
2128
+ def user_platform_membership_request_create(user_pk, platform, opts = {})
2129
+ data, _status_code, _headers = user_platform_membership_request_create_with_http_info(user_pk, platform, opts)
2130
+ return data
2131
+ end
2132
+
2133
+ #
2134
+ #
2135
+ # @param user_pk
2136
+ # @param platform The platform that the User requests to join.
2137
+ # @param [Hash] opts the optional parameters
2138
+ # @option opts [String] :decision_maker
2139
+ # @return [Array<(UserPlatformMembershipRequestSerializer, Fixnum, Hash)>] UserPlatformMembershipRequestSerializer data, response status code and response headers
2140
+ def user_platform_membership_request_create_with_http_info(user_pk, platform, opts = {})
2141
+ if @api_client.config.debugging
2142
+ @api_client.config.logger.debug "Calling API: UsersApi.user_platform_membership_request_create ..."
2143
+ end
2144
+ # verify the required parameter 'user_pk' is set
2145
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.user_platform_membership_request_create" if user_pk.nil?
2146
+ # verify the required parameter 'platform' is set
2147
+ fail ArgumentError, "Missing the required parameter 'platform' when calling UsersApi.user_platform_membership_request_create" if platform.nil?
2148
+ # resource path
2149
+ local_var_path = "/users/{user_pk}/platform_membership_requests/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
2150
+
2151
+ # query parameters
2152
+ query_params = {}
2153
+
2154
+ # header parameters
2155
+ header_params = {}
2156
+
2157
+ # HTTP header 'Accept' (if needed)
2158
+ local_header_accept = []
2159
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2160
+
2161
+ # HTTP header 'Content-Type'
2162
+ local_header_content_type = []
2163
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2164
+
2165
+ # form parameters
2166
+ form_params = {}
2167
+ form_params["platform"] = platform
2168
+ form_params["decision_maker"] = opts[:'decision_maker'] if !opts[:'decision_maker'].nil?
2169
+
2170
+ # http body (model)
2171
+ post_body = nil
2172
+ auth_names = []
2173
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2174
+ :header_params => header_params,
2175
+ :query_params => query_params,
2176
+ :form_params => form_params,
2177
+ :body => post_body,
2178
+ :auth_names => auth_names,
2179
+ :return_type => 'UserPlatformMembershipRequestSerializer')
2180
+ if @api_client.config.debugging
2181
+ @api_client.config.logger.debug "API called: UsersApi#user_platform_membership_request_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2182
+ end
2183
+ return data, status_code, headers
2184
+ end
2185
+
2186
+ #
2187
+ #
2188
+ # @param user_pk
2189
+ # @param [Hash] opts the optional parameters
2190
+ # @return [Array<UserPlatformMembershipRequestSerializer>]
2191
+ def user_platform_membership_request_list(user_pk, opts = {})
2192
+ data, _status_code, _headers = user_platform_membership_request_list_with_http_info(user_pk, opts)
2193
+ return data
2194
+ end
2195
+
2196
+ #
2197
+ #
2198
+ # @param user_pk
2199
+ # @param [Hash] opts the optional parameters
2200
+ # @return [Array<(Array<UserPlatformMembershipRequestSerializer>, Fixnum, Hash)>] Array<UserPlatformMembershipRequestSerializer> data, response status code and response headers
2201
+ def user_platform_membership_request_list_with_http_info(user_pk, opts = {})
2202
+ if @api_client.config.debugging
2203
+ @api_client.config.logger.debug "Calling API: UsersApi.user_platform_membership_request_list ..."
2204
+ end
2205
+ # verify the required parameter 'user_pk' is set
2206
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.user_platform_membership_request_list" if user_pk.nil?
2207
+ # resource path
2208
+ local_var_path = "/users/{user_pk}/platform_membership_requests/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
2209
+
2210
+ # query parameters
2211
+ query_params = {}
2212
+
2213
+ # header parameters
2214
+ header_params = {}
2215
+
2216
+ # HTTP header 'Accept' (if needed)
2217
+ local_header_accept = []
2218
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2219
+
2220
+ # HTTP header 'Content-Type'
2221
+ local_header_content_type = []
2222
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2223
+
2224
+ # form parameters
2225
+ form_params = {}
2226
+
2227
+ # http body (model)
2228
+ post_body = nil
2229
+ auth_names = []
2230
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2231
+ :header_params => header_params,
2232
+ :query_params => query_params,
2233
+ :form_params => form_params,
2234
+ :body => post_body,
2235
+ :auth_names => auth_names,
2236
+ :return_type => 'Array<UserPlatformMembershipRequestSerializer>')
2237
+ if @api_client.config.debugging
2238
+ @api_client.config.logger.debug "API called: UsersApi#user_platform_membership_request_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2239
+ end
2240
+ return data, status_code, headers
2241
+ end
2242
+
2243
+ #
2244
+ #
2245
+ # @param user_pk
2246
+ # @param pk
2247
+ # @param [Hash] opts the optional parameters
2248
+ # @return [UserPlatformMembershipRequestSerializer]
2249
+ def user_platform_membership_request_retrieve(user_pk, pk, opts = {})
2250
+ data, _status_code, _headers = user_platform_membership_request_retrieve_with_http_info(user_pk, pk, opts)
2251
+ return data
2252
+ end
2253
+
2254
+ #
2255
+ #
2256
+ # @param user_pk
2257
+ # @param pk
2258
+ # @param [Hash] opts the optional parameters
2259
+ # @return [Array<(UserPlatformMembershipRequestSerializer, Fixnum, Hash)>] UserPlatformMembershipRequestSerializer data, response status code and response headers
2260
+ def user_platform_membership_request_retrieve_with_http_info(user_pk, pk, opts = {})
2261
+ if @api_client.config.debugging
2262
+ @api_client.config.logger.debug "Calling API: UsersApi.user_platform_membership_request_retrieve ..."
2263
+ end
2264
+ # verify the required parameter 'user_pk' is set
2265
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.user_platform_membership_request_retrieve" if user_pk.nil?
2266
+ # verify the required parameter 'pk' is set
2267
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.user_platform_membership_request_retrieve" if pk.nil?
2268
+ # resource path
2269
+ 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)
2270
+
2271
+ # query parameters
2272
+ query_params = {}
2273
+
2274
+ # header parameters
2275
+ header_params = {}
2276
+
2277
+ # HTTP header 'Accept' (if needed)
2278
+ local_header_accept = []
2279
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2280
+
2281
+ # HTTP header 'Content-Type'
2282
+ local_header_content_type = []
2283
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2284
+
2285
+ # form parameters
2286
+ form_params = {}
2287
+
2288
+ # http body (model)
2289
+ post_body = nil
2290
+ auth_names = []
2291
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2292
+ :header_params => header_params,
2293
+ :query_params => query_params,
2294
+ :form_params => form_params,
2295
+ :body => post_body,
2296
+ :auth_names => auth_names,
2297
+ :return_type => 'UserPlatformMembershipRequestSerializer')
2298
+ if @api_client.config.debugging
2299
+ @api_client.config.logger.debug "API called: UsersApi#user_platform_membership_request_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2300
+ end
2301
+ return data, status_code, headers
2302
+ end
2303
+
2304
+ # The list of registered Qwil Users
2305
+ # The list of registered Qwil Users.
2306
+ # @param pk
2307
+ # @param [Hash] opts the optional parameters
2308
+ # @return [ContractorSerializer]
2309
+ def user_retrieve(pk, opts = {})
2310
+ data, _status_code, _headers = user_retrieve_with_http_info(pk, opts)
2311
+ return data
2312
+ end
2313
+
2314
+ # The list of registered Qwil Users
2315
+ # The list of registered Qwil Users.
2316
+ # @param pk
2317
+ # @param [Hash] opts the optional parameters
2318
+ # @return [Array<(ContractorSerializer, Fixnum, Hash)>] ContractorSerializer data, response status code and response headers
2319
+ def user_retrieve_with_http_info(pk, opts = {})
2320
+ if @api_client.config.debugging
2321
+ @api_client.config.logger.debug "Calling API: UsersApi.user_retrieve ..."
2322
+ end
2323
+ # verify the required parameter 'pk' is set
2324
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.user_retrieve" if pk.nil?
2325
+ # resource path
2326
+ local_var_path = "/users/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s)
2327
+
2328
+ # query parameters
2329
+ query_params = {}
2330
+
2331
+ # header parameters
2332
+ header_params = {}
2333
+
2334
+ # HTTP header 'Accept' (if needed)
2335
+ local_header_accept = []
2336
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2337
+
2338
+ # HTTP header 'Content-Type'
2339
+ local_header_content_type = []
2340
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2341
+
2342
+ # form parameters
2343
+ form_params = {}
2344
+
2345
+ # http body (model)
2346
+ post_body = nil
2347
+ auth_names = []
2348
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2349
+ :header_params => header_params,
2350
+ :query_params => query_params,
2351
+ :form_params => form_params,
2352
+ :body => post_body,
2353
+ :auth_names => auth_names,
2354
+ :return_type => 'ContractorSerializer')
2355
+ if @api_client.config.debugging
2356
+ @api_client.config.logger.debug "API called: UsersApi#user_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2357
+ end
2358
+ return data, status_code, headers
2359
+ end
2360
+
2361
+ # The list of registered Qwil Users
2362
+ # The list of registered Qwil Users.
2363
+ # @param pk
2364
+ # @param email
2365
+ # @param [Hash] opts the optional parameters
2366
+ # @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company.
2367
+ # @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company.
2368
+ # @option opts [String] :business_name Business name. Only use this field if this user is a business entity.
2369
+ # @option opts [String] :contractor_type (default to INDIVIDUAL)
2370
+ # @option opts [String] :personal_information
2371
+ # @option opts [String] :default_account Default account to use for payment of unpaid income.
2372
+ # @return [ContractorSerializer]
2373
+ def user_update(pk, email, opts = {})
2374
+ data, _status_code, _headers = user_update_with_http_info(pk, email, opts)
2375
+ return data
2376
+ end
2377
+
2378
+ # The list of registered Qwil Users
2379
+ # The list of registered Qwil Users.
2380
+ # @param pk
2381
+ # @param email
2382
+ # @param [Hash] opts the optional parameters
2383
+ # @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company.
2384
+ # @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company.
2385
+ # @option opts [String] :business_name Business name. Only use this field if this user is a business entity.
2386
+ # @option opts [String] :contractor_type
2387
+ # @option opts [String] :personal_information
2388
+ # @option opts [String] :default_account Default account to use for payment of unpaid income.
2389
+ # @return [Array<(ContractorSerializer, Fixnum, Hash)>] ContractorSerializer data, response status code and response headers
2390
+ def user_update_with_http_info(pk, email, opts = {})
2391
+ if @api_client.config.debugging
2392
+ @api_client.config.logger.debug "Calling API: UsersApi.user_update ..."
2393
+ end
2394
+ # verify the required parameter 'pk' is set
2395
+ fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.user_update" if pk.nil?
2396
+ # verify the required parameter 'email' is set
2397
+ fail ArgumentError, "Missing the required parameter 'email' when calling UsersApi.user_update" if email.nil?
2398
+ if opts[:'contractor_type'] && !['INDIVIDUAL', 'BUSINESS'].include?(opts[:'contractor_type'])
2399
+ fail ArgumentError, 'invalid value for "contractor_type", must be one of INDIVIDUAL, BUSINESS'
2400
+ end
2401
+ # resource path
2402
+ local_var_path = "/users/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s)
2403
+
2404
+ # query parameters
2405
+ query_params = {}
2406
+
2407
+ # header parameters
2408
+ header_params = {}
2409
+
2410
+ # HTTP header 'Accept' (if needed)
2411
+ local_header_accept = []
2412
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2413
+
2414
+ # HTTP header 'Content-Type'
2415
+ local_header_content_type = []
2416
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2417
+
2418
+ # form parameters
2419
+ form_params = {}
2420
+ form_params["email"] = email
2421
+ form_params["first_name"] = opts[:'first_name'] if !opts[:'first_name'].nil?
2422
+ form_params["last_name"] = opts[:'last_name'] if !opts[:'last_name'].nil?
2423
+ form_params["business_name"] = opts[:'business_name'] if !opts[:'business_name'].nil?
2424
+ form_params["contractor_type"] = opts[:'contractor_type'] if !opts[:'contractor_type'].nil?
2425
+ form_params["personal_information"] = opts[:'personal_information'] if !opts[:'personal_information'].nil?
2426
+ form_params["default_account"] = opts[:'default_account'] if !opts[:'default_account'].nil?
2427
+
2428
+ # http body (model)
2429
+ post_body = nil
2430
+ auth_names = []
2431
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
2432
+ :header_params => header_params,
2433
+ :query_params => query_params,
2434
+ :form_params => form_params,
2435
+ :body => post_body,
2436
+ :auth_names => auth_names,
2437
+ :return_type => 'ContractorSerializer')
2438
+ if @api_client.config.debugging
2439
+ @api_client.config.logger.debug "API called: UsersApi#user_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2440
+ end
2441
+ return data, status_code, headers
2442
+ end
2443
+
2444
+ #
2445
+ #
2446
+ # @param user_pk
2447
+ # @param [Hash] opts the optional parameters
2448
+ # @return [Object]
2449
+ def xero_account_get(user_pk, opts = {})
2450
+ data, _status_code, _headers = xero_account_get_with_http_info(user_pk, opts)
2451
+ return data
2452
+ end
2453
+
2454
+ #
2455
+ #
2456
+ # @param user_pk
2457
+ # @param [Hash] opts the optional parameters
2458
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
2459
+ def xero_account_get_with_http_info(user_pk, opts = {})
2460
+ if @api_client.config.debugging
2461
+ @api_client.config.logger.debug "Calling API: UsersApi.xero_account_get ..."
2462
+ end
2463
+ # verify the required parameter 'user_pk' is set
2464
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.xero_account_get" if user_pk.nil?
2465
+ # resource path
2466
+ local_var_path = "/users/{user_pk}/integrations/xero/accounts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
2467
+
2468
+ # query parameters
2469
+ query_params = {}
2470
+
2471
+ # header parameters
2472
+ header_params = {}
2473
+
2474
+ # HTTP header 'Accept' (if needed)
2475
+ local_header_accept = []
2476
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2477
+
2478
+ # HTTP header 'Content-Type'
2479
+ local_header_content_type = []
2480
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2481
+
2482
+ # form parameters
2483
+ form_params = {}
2484
+
2485
+ # http body (model)
2486
+ post_body = nil
2487
+ auth_names = []
2488
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2489
+ :header_params => header_params,
2490
+ :query_params => query_params,
2491
+ :form_params => form_params,
2492
+ :body => post_body,
2493
+ :auth_names => auth_names,
2494
+ :return_type => 'Object')
2495
+ if @api_client.config.debugging
2496
+ @api_client.config.logger.debug "API called: UsersApi#xero_account_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2497
+ end
2498
+ return data, status_code, headers
2499
+ end
2500
+
2501
+ #
2502
+ #
2503
+ # @param user_pk
2504
+ # @param [Hash] opts the optional parameters
2505
+ # @return [Object]
2506
+ def xero_account_put(user_pk, opts = {})
2507
+ data, _status_code, _headers = xero_account_put_with_http_info(user_pk, opts)
2508
+ return data
2509
+ end
2510
+
2511
+ #
2512
+ #
2513
+ # @param user_pk
2514
+ # @param [Hash] opts the optional parameters
2515
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
2516
+ def xero_account_put_with_http_info(user_pk, opts = {})
2517
+ if @api_client.config.debugging
2518
+ @api_client.config.logger.debug "Calling API: UsersApi.xero_account_put ..."
2519
+ end
2520
+ # verify the required parameter 'user_pk' is set
2521
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.xero_account_put" if user_pk.nil?
2522
+ # resource path
2523
+ local_var_path = "/users/{user_pk}/integrations/xero/accounts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
2524
+
2525
+ # query parameters
2526
+ query_params = {}
2527
+
2528
+ # header parameters
2529
+ header_params = {}
2530
+
2531
+ # HTTP header 'Accept' (if needed)
2532
+ local_header_accept = []
2533
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2534
+
2535
+ # HTTP header 'Content-Type'
2536
+ local_header_content_type = []
2537
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2538
+
2539
+ # form parameters
2540
+ form_params = {}
2541
+
2542
+ # http body (model)
2543
+ post_body = nil
2544
+ auth_names = []
2545
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
2546
+ :header_params => header_params,
2547
+ :query_params => query_params,
2548
+ :form_params => form_params,
2549
+ :body => post_body,
2550
+ :auth_names => auth_names,
2551
+ :return_type => 'Object')
2552
+ if @api_client.config.debugging
2553
+ @api_client.config.logger.debug "API called: UsersApi#xero_account_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2554
+ end
2555
+ return data, status_code, headers
2556
+ end
2557
+
2558
+ #
2559
+ #
2560
+ # @param user_pk
2561
+ # @param [Hash] opts the optional parameters
2562
+ # @return [Object]
2563
+ def xero_auth_callback_get(user_pk, opts = {})
2564
+ data, _status_code, _headers = xero_auth_callback_get_with_http_info(user_pk, opts)
2565
+ return data
2566
+ end
2567
+
2568
+ #
2569
+ #
2570
+ # @param user_pk
2571
+ # @param [Hash] opts the optional parameters
2572
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
2573
+ def xero_auth_callback_get_with_http_info(user_pk, opts = {})
2574
+ if @api_client.config.debugging
2575
+ @api_client.config.logger.debug "Calling API: UsersApi.xero_auth_callback_get ..."
2576
+ end
2577
+ # verify the required parameter 'user_pk' is set
2578
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.xero_auth_callback_get" if user_pk.nil?
2579
+ # resource path
2580
+ local_var_path = "/users/{user_pk}/integrations/xero/authenticate/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
2581
+
2582
+ # query parameters
2583
+ query_params = {}
2584
+
2585
+ # header parameters
2586
+ header_params = {}
2587
+
2588
+ # HTTP header 'Accept' (if needed)
2589
+ local_header_accept = []
2590
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2591
+
2592
+ # HTTP header 'Content-Type'
2593
+ local_header_content_type = []
2594
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2595
+
2596
+ # form parameters
2597
+ form_params = {}
2598
+
2599
+ # http body (model)
2600
+ post_body = nil
2601
+ auth_names = []
2602
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2603
+ :header_params => header_params,
2604
+ :query_params => query_params,
2605
+ :form_params => form_params,
2606
+ :body => post_body,
2607
+ :auth_names => auth_names,
2608
+ :return_type => 'Object')
2609
+ if @api_client.config.debugging
2610
+ @api_client.config.logger.debug "API called: UsersApi#xero_auth_callback_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2611
+ end
2612
+ return data, status_code, headers
2613
+ end
2614
+
2615
+ #
2616
+ #
2617
+ # @param user_pk
2618
+ # @param [Hash] opts the optional parameters
2619
+ # @return [Object]
2620
+ def xero_auth_url_get(user_pk, opts = {})
2621
+ data, _status_code, _headers = xero_auth_url_get_with_http_info(user_pk, opts)
2622
+ return data
2623
+ end
2624
+
2625
+ #
2626
+ #
2627
+ # @param user_pk
2628
+ # @param [Hash] opts the optional parameters
2629
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
2630
+ def xero_auth_url_get_with_http_info(user_pk, opts = {})
2631
+ if @api_client.config.debugging
2632
+ @api_client.config.logger.debug "Calling API: UsersApi.xero_auth_url_get ..."
2633
+ end
2634
+ # verify the required parameter 'user_pk' is set
2635
+ fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.xero_auth_url_get" if user_pk.nil?
2636
+ # resource path
2637
+ local_var_path = "/users/{user_pk}/integrations/xero/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)
2638
+
2639
+ # query parameters
2640
+ query_params = {}
2641
+
2642
+ # header parameters
2643
+ header_params = {}
2644
+
2645
+ # HTTP header 'Accept' (if needed)
2646
+ local_header_accept = []
2647
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
2648
+
2649
+ # HTTP header 'Content-Type'
2650
+ local_header_content_type = []
2651
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
2652
+
2653
+ # form parameters
2654
+ form_params = {}
2655
+
2656
+ # http body (model)
2657
+ post_body = nil
2658
+ auth_names = []
2659
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2660
+ :header_params => header_params,
2661
+ :query_params => query_params,
2662
+ :form_params => form_params,
2663
+ :body => post_body,
2664
+ :auth_names => auth_names,
2665
+ :return_type => 'Object')
2666
+ if @api_client.config.debugging
2667
+ @api_client.config.logger.debug "API called: UsersApi#xero_auth_url_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2668
+ end
2669
+ return data, status_code, headers
2670
+ end
2671
+ end
2672
+ end