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,320 @@
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 AccountsApi
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 all Users
33
+ # The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.<br/>Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.<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.<br/>=> PATCH https://api.qwil.co/accounts/1/ {...}<br/><= 200 OK { \"url\": \"https://api.qwil.co/accounts/2/\", ... }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, but deleted Accounts will still be displayed in the /accounts/ list.
34
+ # @param pk
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [AccountSerializer]
37
+ def account_destroy(pk, opts = {})
38
+ data, _status_code, _headers = account_destroy_with_http_info(pk, opts)
39
+ return data
40
+ end
41
+
42
+ # The bank accounts for all Users
43
+ # The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.&lt;br/&gt;Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.&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.&lt;br/&gt;&#x3D;&gt; PATCH https://api.qwil.co/accounts/1/ {...}&lt;br/&gt;&lt;&#x3D; 200 OK { \&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, but deleted Accounts will still be displayed in the /accounts/ list.
44
+ # @param pk
45
+ # @param [Hash] opts the optional parameters
46
+ # @return [Array<(AccountSerializer, Fixnum, Hash)>] AccountSerializer data, response status code and response headers
47
+ def account_destroy_with_http_info(pk, opts = {})
48
+ if @api_client.config.debugging
49
+ @api_client.config.logger.debug "Calling API: AccountsApi.account_destroy ..."
50
+ end
51
+ # verify the required parameter 'pk' is set
52
+ fail ArgumentError, "Missing the required parameter 'pk' when calling AccountsApi.account_destroy" if pk.nil?
53
+ # resource path
54
+ local_var_path = "/accounts/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s)
55
+
56
+ # query parameters
57
+ query_params = {}
58
+
59
+ # header parameters
60
+ header_params = {}
61
+
62
+ # HTTP header 'Accept' (if needed)
63
+ local_header_accept = []
64
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
65
+
66
+ # HTTP header 'Content-Type'
67
+ local_header_content_type = []
68
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
69
+
70
+ # form parameters
71
+ form_params = {}
72
+
73
+ # http body (model)
74
+ post_body = nil
75
+ auth_names = []
76
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => 'AccountSerializer')
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: AccountsApi#account_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+
89
+ # The bank accounts for all Users
90
+ # The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.<br/>Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.<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.<br/>=> PATCH https://api.qwil.co/accounts/1/ {...}<br/><= 200 OK { \"url\": \"https://api.qwil.co/accounts/2/\", ... }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, but deleted Accounts will still be displayed in the /accounts/ list.
91
+ # @param pk
92
+ # @param [Hash] opts the optional parameters
93
+ # @option opts [String] :account_number
94
+ # @option opts [String] :name The user&#39;s label for this Account.
95
+ # @option opts [String] :routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length.
96
+ # @option opts [BOOLEAN] :is_tax_savings Flag specifying if the Account is used for tax savings.
97
+ # @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account.
98
+ # @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.
99
+ # @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API.
100
+ # @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API.
101
+ # @option opts [String] :user
102
+ # @return [AccountSerializer]
103
+ def account_partial_update(pk, opts = {})
104
+ data, _status_code, _headers = account_partial_update_with_http_info(pk, opts)
105
+ return data
106
+ end
107
+
108
+ # The bank accounts for all Users
109
+ # The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.&lt;br/&gt;Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.&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.&lt;br/&gt;&#x3D;&gt; PATCH https://api.qwil.co/accounts/1/ {...}&lt;br/&gt;&lt;&#x3D; 200 OK { \&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, but deleted Accounts will still be displayed in the /accounts/ list.
110
+ # @param pk
111
+ # @param [Hash] opts the optional parameters
112
+ # @option opts [String] :account_number
113
+ # @option opts [String] :name The user&#39;s label for this Account.
114
+ # @option opts [String] :routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length.
115
+ # @option opts [BOOLEAN] :is_tax_savings Flag specifying if the Account is used for tax savings.
116
+ # @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account.
117
+ # @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.
118
+ # @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API.
119
+ # @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API.
120
+ # @option opts [String] :user
121
+ # @return [Array<(AccountSerializer, Fixnum, Hash)>] AccountSerializer data, response status code and response headers
122
+ def account_partial_update_with_http_info(pk, opts = {})
123
+ if @api_client.config.debugging
124
+ @api_client.config.logger.debug "Calling API: AccountsApi.account_partial_update ..."
125
+ end
126
+ # verify the required parameter 'pk' is set
127
+ fail ArgumentError, "Missing the required parameter 'pk' when calling AccountsApi.account_partial_update" if pk.nil?
128
+ # resource path
129
+ local_var_path = "/accounts/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s)
130
+
131
+ # query parameters
132
+ query_params = {}
133
+
134
+ # header parameters
135
+ header_params = {}
136
+
137
+ # HTTP header 'Accept' (if needed)
138
+ local_header_accept = []
139
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
140
+
141
+ # HTTP header 'Content-Type'
142
+ local_header_content_type = []
143
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
144
+
145
+ # form parameters
146
+ form_params = {}
147
+ form_params["account_number"] = opts[:'account_number'] if !opts[:'account_number'].nil?
148
+ form_params["name"] = opts[:'name'] if !opts[:'name'].nil?
149
+ form_params["routing_number"] = opts[:'routing_number'] if !opts[:'routing_number'].nil?
150
+ form_params["is_tax_savings"] = opts[:'is_tax_savings'] if !opts[:'is_tax_savings'].nil?
151
+ form_params["is_paypal"] = opts[:'is_paypal'] if !opts[:'is_paypal'].nil?
152
+ form_params["is_mychoice"] = opts[:'is_mychoice'] if !opts[:'is_mychoice'].nil?
153
+ form_params["mychoice_user_id"] = opts[:'mychoice_user_id'] if !opts[:'mychoice_user_id'].nil?
154
+ form_params["mychoice_card_id"] = opts[:'mychoice_card_id'] if !opts[:'mychoice_card_id'].nil?
155
+ form_params["user"] = opts[:'user'] if !opts[:'user'].nil?
156
+
157
+ # http body (model)
158
+ post_body = nil
159
+ auth_names = []
160
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
161
+ :header_params => header_params,
162
+ :query_params => query_params,
163
+ :form_params => form_params,
164
+ :body => post_body,
165
+ :auth_names => auth_names,
166
+ :return_type => 'AccountSerializer')
167
+ if @api_client.config.debugging
168
+ @api_client.config.logger.debug "API called: AccountsApi#account_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
169
+ end
170
+ return data, status_code, headers
171
+ end
172
+
173
+ # The bank accounts for all Users
174
+ # The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.<br/>Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.<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.<br/>=> PATCH https://api.qwil.co/accounts/1/ {...}<br/><= 200 OK { \"url\": \"https://api.qwil.co/accounts/2/\", ... }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, but deleted Accounts will still be displayed in the /accounts/ list.
175
+ # @param pk
176
+ # @param [Hash] opts the optional parameters
177
+ # @return [AccountSerializer]
178
+ def account_retrieve(pk, opts = {})
179
+ data, _status_code, _headers = account_retrieve_with_http_info(pk, opts)
180
+ return data
181
+ end
182
+
183
+ # The bank accounts for all Users
184
+ # The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.&lt;br/&gt;Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.&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.&lt;br/&gt;&#x3D;&gt; PATCH https://api.qwil.co/accounts/1/ {...}&lt;br/&gt;&lt;&#x3D; 200 OK { \&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, but deleted Accounts will still be displayed in the /accounts/ list.
185
+ # @param pk
186
+ # @param [Hash] opts the optional parameters
187
+ # @return [Array<(AccountSerializer, Fixnum, Hash)>] AccountSerializer data, response status code and response headers
188
+ def account_retrieve_with_http_info(pk, opts = {})
189
+ if @api_client.config.debugging
190
+ @api_client.config.logger.debug "Calling API: AccountsApi.account_retrieve ..."
191
+ end
192
+ # verify the required parameter 'pk' is set
193
+ fail ArgumentError, "Missing the required parameter 'pk' when calling AccountsApi.account_retrieve" if pk.nil?
194
+ # resource path
195
+ local_var_path = "/accounts/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s)
196
+
197
+ # query parameters
198
+ query_params = {}
199
+
200
+ # header parameters
201
+ header_params = {}
202
+
203
+ # HTTP header 'Accept' (if needed)
204
+ local_header_accept = []
205
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
206
+
207
+ # HTTP header 'Content-Type'
208
+ local_header_content_type = []
209
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
210
+
211
+ # form parameters
212
+ form_params = {}
213
+
214
+ # http body (model)
215
+ post_body = nil
216
+ auth_names = []
217
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
218
+ :header_params => header_params,
219
+ :query_params => query_params,
220
+ :form_params => form_params,
221
+ :body => post_body,
222
+ :auth_names => auth_names,
223
+ :return_type => 'AccountSerializer')
224
+ if @api_client.config.debugging
225
+ @api_client.config.logger.debug "API called: AccountsApi#account_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
226
+ end
227
+ return data, status_code, headers
228
+ end
229
+
230
+ # The bank accounts for all Users
231
+ # The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.<br/>Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.<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.<br/>=> PATCH https://api.qwil.co/accounts/1/ {...}<br/><= 200 OK { \"url\": \"https://api.qwil.co/accounts/2/\", ... }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, but deleted Accounts will still be displayed in the /accounts/ list.
232
+ # @param pk
233
+ # @param account_number
234
+ # @param name The user&#39;s label for this Account.
235
+ # @param routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length.
236
+ # @param [Hash] opts the optional parameters
237
+ # @option opts [BOOLEAN] :is_tax_savings Flag specifying if the Account is used for tax savings.
238
+ # @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account.
239
+ # @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.
240
+ # @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API.
241
+ # @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API.
242
+ # @option opts [String] :user
243
+ # @return [AccountSerializer]
244
+ def account_update(pk, account_number, name, routing_number, opts = {})
245
+ data, _status_code, _headers = account_update_with_http_info(pk, account_number, name, routing_number, opts)
246
+ return data
247
+ end
248
+
249
+ # The bank accounts for all Users
250
+ # The bank accounts for all Users. Enables retrieve, update (PUT/PATCH), and destroy.&lt;br/&gt;Note that the Account API objects are immutable, but the DELETE API method is still offered to allow users to remove Accounts.&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.&lt;br/&gt;&#x3D;&gt; PATCH https://api.qwil.co/accounts/1/ {...}&lt;br/&gt;&lt;&#x3D; 200 OK { \&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, but deleted Accounts will still be displayed in the /accounts/ list.
251
+ # @param pk
252
+ # @param account_number
253
+ # @param name The user&#39;s label for this Account.
254
+ # @param routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length.
255
+ # @param [Hash] opts the optional parameters
256
+ # @option opts [BOOLEAN] :is_tax_savings Flag specifying if the Account is used for tax savings.
257
+ # @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account.
258
+ # @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.
259
+ # @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API.
260
+ # @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API.
261
+ # @option opts [String] :user
262
+ # @return [Array<(AccountSerializer, Fixnum, Hash)>] AccountSerializer data, response status code and response headers
263
+ def account_update_with_http_info(pk, account_number, name, routing_number, opts = {})
264
+ if @api_client.config.debugging
265
+ @api_client.config.logger.debug "Calling API: AccountsApi.account_update ..."
266
+ end
267
+ # verify the required parameter 'pk' is set
268
+ fail ArgumentError, "Missing the required parameter 'pk' when calling AccountsApi.account_update" if pk.nil?
269
+ # verify the required parameter 'account_number' is set
270
+ fail ArgumentError, "Missing the required parameter 'account_number' when calling AccountsApi.account_update" if account_number.nil?
271
+ # verify the required parameter 'name' is set
272
+ fail ArgumentError, "Missing the required parameter 'name' when calling AccountsApi.account_update" if name.nil?
273
+ # verify the required parameter 'routing_number' is set
274
+ fail ArgumentError, "Missing the required parameter 'routing_number' when calling AccountsApi.account_update" if routing_number.nil?
275
+ # resource path
276
+ local_var_path = "/accounts/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s)
277
+
278
+ # query parameters
279
+ query_params = {}
280
+
281
+ # header parameters
282
+ header_params = {}
283
+
284
+ # HTTP header 'Accept' (if needed)
285
+ local_header_accept = []
286
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
287
+
288
+ # HTTP header 'Content-Type'
289
+ local_header_content_type = []
290
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
291
+
292
+ # form parameters
293
+ form_params = {}
294
+ form_params["account_number"] = account_number
295
+ form_params["name"] = name
296
+ form_params["routing_number"] = routing_number
297
+ form_params["is_tax_savings"] = opts[:'is_tax_savings'] if !opts[:'is_tax_savings'].nil?
298
+ form_params["is_paypal"] = opts[:'is_paypal'] if !opts[:'is_paypal'].nil?
299
+ form_params["is_mychoice"] = opts[:'is_mychoice'] if !opts[:'is_mychoice'].nil?
300
+ form_params["mychoice_user_id"] = opts[:'mychoice_user_id'] if !opts[:'mychoice_user_id'].nil?
301
+ form_params["mychoice_card_id"] = opts[:'mychoice_card_id'] if !opts[:'mychoice_card_id'].nil?
302
+ form_params["user"] = opts[:'user'] if !opts[:'user'].nil?
303
+
304
+ # http body (model)
305
+ post_body = nil
306
+ auth_names = []
307
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
308
+ :header_params => header_params,
309
+ :query_params => query_params,
310
+ :form_params => form_params,
311
+ :body => post_body,
312
+ :auth_names => auth_names,
313
+ :return_type => 'AccountSerializer')
314
+ if @api_client.config.debugging
315
+ @api_client.config.logger.debug "API called: AccountsApi#account_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
316
+ end
317
+ return data, status_code, headers
318
+ end
319
+ end
320
+ end
@@ -0,0 +1,87 @@
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 ApitokenauthApi
26
+ attr_accessor :api_client
27
+
28
+ def initialize(api_client = ApiClient.default)
29
+ @api_client = api_client
30
+ end
31
+
32
+ # API View that receives a POST with a user's username and password
33
+ # API View that receives a POST with a user's username and password.<br/>Returns a JSON Web Token that can be used for authenticated requests.
34
+ # @param [Hash] opts the optional parameters
35
+ # @option opts [JSONWebTokenSerializer] :json_web_token_serializer
36
+ # @return [JSONWebTokenSerializer]
37
+ def obtain_json_web_token_post(opts = {})
38
+ data, _status_code, _headers = obtain_json_web_token_post_with_http_info(opts)
39
+ return data
40
+ end
41
+
42
+ # API View that receives a POST with a user&#39;s username and password
43
+ # API View that receives a POST with a user&#39;s username and password.&lt;br/&gt;Returns a JSON Web Token that can be used for authenticated requests.
44
+ # @param [Hash] opts the optional parameters
45
+ # @option opts [JSONWebTokenSerializer] :json_web_token_serializer
46
+ # @return [Array<(JSONWebTokenSerializer, Fixnum, Hash)>] JSONWebTokenSerializer data, response status code and response headers
47
+ def obtain_json_web_token_post_with_http_info(opts = {})
48
+ if @api_client.config.debugging
49
+ @api_client.config.logger.debug "Calling API: ApitokenauthApi.obtain_json_web_token_post ..."
50
+ end
51
+ # resource path
52
+ local_var_path = "/api-token-auth/".sub('{format}','json')
53
+
54
+ # query parameters
55
+ query_params = {}
56
+
57
+ # header parameters
58
+ header_params = {}
59
+
60
+ # HTTP header 'Accept' (if needed)
61
+ local_header_accept = []
62
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
63
+
64
+ # HTTP header 'Content-Type'
65
+ local_header_content_type = []
66
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
67
+
68
+ # form parameters
69
+ form_params = {}
70
+
71
+ # http body (model)
72
+ post_body = @api_client.object_to_http_body(opts[:'json_web_token_serializer'])
73
+ auth_names = []
74
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => 'JSONWebTokenSerializer')
81
+ if @api_client.config.debugging
82
+ @api_client.config.logger.debug "API called: ApitokenauthApi#obtain_json_web_token_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ end
84
+ return data, status_code, headers
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,89 @@
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 CashoutsApi
26
+ attr_accessor :api_client
27
+
28
+ def initialize(api_client = ApiClient.default)
29
+ @api_client = api_client
30
+ end
31
+
32
+ # The Cashouts endpoint for all Users
33
+ # The Cashouts endpoint for all Users. Only allows retrieval of individual objects e.g. GET /cashouts/1/.
34
+ # @param pk
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [CashoutSerializer]
37
+ def cashout_retrieve(pk, opts = {})
38
+ data, _status_code, _headers = cashout_retrieve_with_http_info(pk, opts)
39
+ return data
40
+ end
41
+
42
+ # The Cashouts endpoint for all Users
43
+ # The Cashouts endpoint for all Users. Only allows retrieval of individual objects e.g. GET /cashouts/1/.
44
+ # @param pk
45
+ # @param [Hash] opts the optional parameters
46
+ # @return [Array<(CashoutSerializer, Fixnum, Hash)>] CashoutSerializer data, response status code and response headers
47
+ def cashout_retrieve_with_http_info(pk, opts = {})
48
+ if @api_client.config.debugging
49
+ @api_client.config.logger.debug "Calling API: CashoutsApi.cashout_retrieve ..."
50
+ end
51
+ # verify the required parameter 'pk' is set
52
+ fail ArgumentError, "Missing the required parameter 'pk' when calling CashoutsApi.cashout_retrieve" if pk.nil?
53
+ # resource path
54
+ local_var_path = "/cashouts/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s)
55
+
56
+ # query parameters
57
+ query_params = {}
58
+
59
+ # header parameters
60
+ header_params = {}
61
+
62
+ # HTTP header 'Accept' (if needed)
63
+ local_header_accept = []
64
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
65
+
66
+ # HTTP header 'Content-Type'
67
+ local_header_content_type = []
68
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
69
+
70
+ # form parameters
71
+ form_params = {}
72
+
73
+ # http body (model)
74
+ post_body = nil
75
+ auth_names = []
76
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => 'CashoutSerializer')
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: CashoutsApi#cashout_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,142 @@
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 IncomeApi
26
+ attr_accessor :api_client
27
+
28
+ def initialize(api_client = ApiClient.default)
29
+ @api_client = api_client
30
+ end
31
+
32
+ # The list of Income items for all Users
33
+ # The list of Income items for all Users.<br/>This can be filtered by date using the start_date and end_date query parameters.
34
+ # @param [Hash] opts the optional parameters
35
+ # @return [Array<IncomeSerializer>]
36
+ def income_list(opts = {})
37
+ data, _status_code, _headers = income_list_with_http_info(opts)
38
+ return data
39
+ end
40
+
41
+ # The list of Income items for all Users
42
+ # The list of Income items for all Users.&lt;br/&gt;This can be filtered by date using the start_date and end_date query parameters.
43
+ # @param [Hash] opts the optional parameters
44
+ # @return [Array<(Array<IncomeSerializer>, Fixnum, Hash)>] Array<IncomeSerializer> data, response status code and response headers
45
+ def income_list_with_http_info(opts = {})
46
+ if @api_client.config.debugging
47
+ @api_client.config.logger.debug "Calling API: IncomeApi.income_list ..."
48
+ end
49
+ # resource path
50
+ local_var_path = "/income/".sub('{format}','json')
51
+
52
+ # query parameters
53
+ query_params = {}
54
+
55
+ # header parameters
56
+ header_params = {}
57
+
58
+ # HTTP header 'Accept' (if needed)
59
+ local_header_accept = []
60
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
61
+
62
+ # HTTP header 'Content-Type'
63
+ local_header_content_type = []
64
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
65
+
66
+ # form parameters
67
+ form_params = {}
68
+
69
+ # http body (model)
70
+ post_body = nil
71
+ auth_names = []
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => 'Array<IncomeSerializer>')
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: IncomeApi#income_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+
85
+ # The list of Income items for all Users
86
+ # The list of Income items for all Users.<br/>This can be filtered by date using the start_date and end_date query parameters.
87
+ # @param pk
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [IncomeSerializer]
90
+ def income_retrieve(pk, opts = {})
91
+ data, _status_code, _headers = income_retrieve_with_http_info(pk, opts)
92
+ return data
93
+ end
94
+
95
+ # The list of Income items for all Users
96
+ # The list of Income items for all Users.&lt;br/&gt;This can be filtered by date using the start_date and end_date query parameters.
97
+ # @param pk
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [Array<(IncomeSerializer, Fixnum, Hash)>] IncomeSerializer data, response status code and response headers
100
+ def income_retrieve_with_http_info(pk, opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug "Calling API: IncomeApi.income_retrieve ..."
103
+ end
104
+ # verify the required parameter 'pk' is set
105
+ fail ArgumentError, "Missing the required parameter 'pk' when calling IncomeApi.income_retrieve" if pk.nil?
106
+ # resource path
107
+ local_var_path = "/income/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s)
108
+
109
+ # query parameters
110
+ query_params = {}
111
+
112
+ # header parameters
113
+ header_params = {}
114
+
115
+ # HTTP header 'Accept' (if needed)
116
+ local_header_accept = []
117
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
118
+
119
+ # HTTP header 'Content-Type'
120
+ local_header_content_type = []
121
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
122
+
123
+ # form parameters
124
+ form_params = {}
125
+
126
+ # http body (model)
127
+ post_body = nil
128
+ auth_names = []
129
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
130
+ :header_params => header_params,
131
+ :query_params => query_params,
132
+ :form_params => form_params,
133
+ :body => post_body,
134
+ :auth_names => auth_names,
135
+ :return_type => 'IncomeSerializer')
136
+ if @api_client.config.debugging
137
+ @api_client.config.logger.debug "API called: IncomeApi#income_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
138
+ end
139
+ return data, status_code, headers
140
+ end
141
+ end
142
+ end