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.
- checksums.yaml +7 -0
- data/README.md +91 -0
- data/docs/AccountSerializer.md +18 -0
- data/docs/AccountsApi.md +243 -0
- data/docs/ApitokenauthApi.md +57 -0
- data/docs/CashoutCalculationSerializer.md +10 -0
- data/docs/CashoutSerializer.md +20 -0
- data/docs/CashoutSliceSerializer.md +11 -0
- data/docs/CashoutsApi.md +56 -0
- data/docs/CompanyInformationSerializer.md +18 -0
- data/docs/ContactInfoSerializer.md +10 -0
- data/docs/ContactInformationSerializer.md +16 -0
- data/docs/ContractorSerializer.md +20 -0
- data/docs/IncomeApi.md +98 -0
- data/docs/IncomeNestedSerializer.md +18 -0
- data/docs/IncomeSerializer.md +18 -0
- data/docs/IncomeSerializerFixedSource.md +18 -0
- data/docs/InvoiceSerializer.md +17 -0
- data/docs/InvoiceSerializerFixedSourceCreate.md +17 -0
- data/docs/InvoicesApi.md +98 -0
- data/docs/JSONWebTokenSerializer.md +7 -0
- data/docs/ManagerPlatformSerializer.md +22 -0
- data/docs/ManagerSerializer.md +10 -0
- data/docs/ManagersApi.md +172 -0
- data/docs/MembershipSerializer.md +9 -0
- data/docs/MembershipsApi.md +56 -0
- data/docs/PersonalInformationSerializer.md +16 -0
- data/docs/PlaidPublicTokenSerializer.md +8 -0
- data/docs/PlatformIncomeRequestSerializer.md +15 -0
- data/docs/PlatformMembershipRequestSerializer.md +11 -0
- data/docs/PlatformSerializer.md +30 -0
- data/docs/PlatformSummarySerializer.md +10 -0
- data/docs/PlatformsApi.md +1369 -0
- data/docs/RebateSerializer.md +15 -0
- data/docs/RebatesApi.md +98 -0
- data/docs/ReceivablesSerializer.md +9 -0
- data/docs/TaxSavingsSerializer.md +10 -0
- data/docs/UserAccountSerializer.md +17 -0
- data/docs/UserCashoutSerializer.md +20 -0
- data/docs/UserIncomeRequestSerializer.md +15 -0
- data/docs/UserPlatformMembershipRequestSerializer.md +13 -0
- data/docs/UserSerializer.md +40 -0
- data/docs/UsersApi.md +2173 -0
- data/docs/WriteAccountSerializer.md +16 -0
- data/docs/WriteCashoutCalculationSerializer.md +8 -0
- data/docs/WriteCashoutSerializer.md +16 -0
- data/docs/WriteCashoutSliceSerializer.md +11 -0
- data/docs/WriteCompanyInformationSerializer.md +17 -0
- data/docs/WriteContactInfoSerializer.md +10 -0
- data/docs/WriteContactInformationSerializer.md +15 -0
- data/docs/WriteContractorSerializer.md +14 -0
- data/docs/WriteIncomeNestedSerializer.md +12 -0
- data/docs/WriteIncomeSerializer.md +13 -0
- data/docs/WriteIncomeSerializerFixedSource.md +12 -0
- data/docs/WriteInvoiceSerializer.md +13 -0
- data/docs/WriteInvoiceSerializerFixedSourceCreate.md +9 -0
- data/docs/WriteJSONWebTokenSerializer.md +7 -0
- data/docs/WriteManagerPlatformSerializer.md +15 -0
- data/docs/WriteManagerSerializer.md +8 -0
- data/docs/WriteMembershipSerializer.md +8 -0
- data/docs/WritePersonalInformationSerializer.md +16 -0
- data/docs/WritePlaidPublicTokenSerializer.md +8 -0
- data/docs/WritePlatformIncomeRequestSerializer.md +10 -0
- data/docs/WritePlatformMembershipRequestSerializer.md +7 -0
- data/docs/WritePlatformSerializer.md +19 -0
- data/docs/WritePlatformSummarySerializer.md +8 -0
- data/docs/WriteRebateSerializer.md +9 -0
- data/docs/WriteReceivablesSerializer.md +8 -0
- data/docs/WriteTaxSavingsSerializer.md +8 -0
- data/docs/WriteUserAccountSerializer.md +14 -0
- data/docs/WriteUserCashoutSerializer.md +15 -0
- data/docs/WriteUserIncomeRequestSerializer.md +10 -0
- data/docs/WriteUserPlatformMembershipRequestSerializer.md +9 -0
- data/docs/WriteUserSerializer.md +21 -0
- data/generate-client.sh +6 -0
- data/lib/qwil_api/api/accounts_api.rb +320 -0
- data/lib/qwil_api/api/apitokenauth_api.rb +87 -0
- data/lib/qwil_api/api/cashouts_api.rb +89 -0
- data/lib/qwil_api/api/income_api.rb +142 -0
- data/lib/qwil_api/api/invoices_api.rb +142 -0
- data/lib/qwil_api/api/managers_api.rb +237 -0
- data/lib/qwil_api/api/memberships_api.rb +89 -0
- data/lib/qwil_api/api/platforms_api.rb +1674 -0
- data/lib/qwil_api/api/rebates_api.rb +142 -0
- data/lib/qwil_api/api/users_api.rb +2672 -0
- data/lib/qwil_api/api_client.rb +376 -0
- data/lib/qwil_api/api_error.rb +45 -0
- data/lib/qwil_api/configuration.rb +205 -0
- data/lib/qwil_api/models/account_serializer.rb +370 -0
- data/lib/qwil_api/models/cashout_calculation_serializer.rb +221 -0
- data/lib/qwil_api/models/cashout_serializer.rb +379 -0
- data/lib/qwil_api/models/cashout_slice_serializer.rb +232 -0
- data/lib/qwil_api/models/company_information_serializer.rb +299 -0
- data/lib/qwil_api/models/contact_info_serializer.rb +218 -0
- data/lib/qwil_api/models/contact_information_serializer.rb +280 -0
- data/lib/qwil_api/models/contractor_serializer.rb +361 -0
- data/lib/qwil_api/models/income_nested_serializer.rb +302 -0
- data/lib/qwil_api/models/income_serializer.rb +302 -0
- data/lib/qwil_api/models/income_serializer_fixed_source.rb +302 -0
- data/lib/qwil_api/models/invoice_serializer.rb +299 -0
- data/lib/qwil_api/models/invoice_serializer_fixed_source_create.rb +299 -0
- data/lib/qwil_api/models/json_web_token_serializer.rb +188 -0
- data/lib/qwil_api/models/manager_platform_serializer.rb +391 -0
- data/lib/qwil_api/models/manager_serializer.rb +218 -0
- data/lib/qwil_api/models/membership_serializer.rb +208 -0
- data/lib/qwil_api/models/personal_information_serializer.rb +279 -0
- data/lib/qwil_api/models/plaid_public_token_serializer.rb +199 -0
- data/lib/qwil_api/models/platform_income_request_serializer.rb +307 -0
- data/lib/qwil_api/models/platform_membership_request_serializer.rb +262 -0
- data/lib/qwil_api/models/platform_serializer.rb +480 -0
- data/lib/qwil_api/models/platform_summary_serializer.rb +218 -0
- data/lib/qwil_api/models/rebate_serializer.rb +276 -0
- data/lib/qwil_api/models/receivables_serializer.rb +208 -0
- data/lib/qwil_api/models/tax_savings_serializer.rb +219 -0
- data/lib/qwil_api/models/user_account_serializer.rb +359 -0
- data/lib/qwil_api/models/user_cashout_serializer.rb +379 -0
- data/lib/qwil_api/models/user_income_request_serializer.rb +307 -0
- data/lib/qwil_api/models/user_platform_membership_request_serializer.rb +283 -0
- data/lib/qwil_api/models/user_serializer.rb +592 -0
- data/lib/qwil_api/models/write_account_serializer.rb +331 -0
- data/lib/qwil_api/models/write_cashout_calculation_serializer.rb +198 -0
- data/lib/qwil_api/models/write_cashout_serializer.rb +316 -0
- data/lib/qwil_api/models/write_cashout_slice_serializer.rb +232 -0
- data/lib/qwil_api/models/write_company_information_serializer.rb +280 -0
- data/lib/qwil_api/models/write_contact_info_serializer.rb +218 -0
- data/lib/qwil_api/models/write_contact_information_serializer.rb +262 -0
- data/lib/qwil_api/models/write_contractor_serializer.rb +289 -0
- data/lib/qwil_api/models/write_income_nested_serializer.rb +236 -0
- data/lib/qwil_api/models/write_income_serializer.rb +247 -0
- data/lib/qwil_api/models/write_income_serializer_fixed_source.rb +236 -0
- data/lib/qwil_api/models/write_invoice_serializer.rb +252 -0
- data/lib/qwil_api/models/write_invoice_serializer_fixed_source_create.rb +210 -0
- data/lib/qwil_api/models/write_json_web_token_serializer.rb +188 -0
- data/lib/qwil_api/models/write_manager_platform_serializer.rb +314 -0
- data/lib/qwil_api/models/write_manager_serializer.rb +198 -0
- data/lib/qwil_api/models/write_membership_serializer.rb +198 -0
- data/lib/qwil_api/models/write_personal_information_serializer.rb +270 -0
- data/lib/qwil_api/models/write_plaid_public_token_serializer.rb +199 -0
- data/lib/qwil_api/models/write_platform_income_request_serializer.rb +220 -0
- data/lib/qwil_api/models/write_platform_membership_request_serializer.rb +188 -0
- data/lib/qwil_api/models/write_platform_serializer.rb +309 -0
- data/lib/qwil_api/models/write_platform_summary_serializer.rb +198 -0
- data/lib/qwil_api/models/write_rebate_serializer.rb +209 -0
- data/lib/qwil_api/models/write_receivables_serializer.rb +198 -0
- data/lib/qwil_api/models/write_tax_savings_serializer.rb +198 -0
- data/lib/qwil_api/models/write_user_account_serializer.rb +312 -0
- data/lib/qwil_api/models/write_user_cashout_serializer.rb +307 -0
- data/lib/qwil_api/models/write_user_income_request_serializer.rb +220 -0
- data/lib/qwil_api/models/write_user_platform_membership_request_serializer.rb +208 -0
- data/lib/qwil_api/models/write_user_serializer.rb +358 -0
- data/lib/qwil_api/version.rb +24 -0
- data/lib/qwil_api.rb +51 -0
- data/qwil_api.gemspec +53 -0
- data/spec/api/accounts_api_spec.rb +110 -0
- data/spec/api/apitokenauth_api_spec.rb +56 -0
- data/spec/api/cashouts_api_spec.rb +56 -0
- data/spec/api/income_api_spec.rb +67 -0
- data/spec/api/invoices_api_spec.rb +67 -0
- data/spec/api/managers_api_spec.rb +88 -0
- data/spec/api/memberships_api_spec.rb +56 -0
- data/spec/api/platforms_api_spec.rb +398 -0
- data/spec/api/rebates_api_spec.rb +67 -0
- data/spec/api/users_api_spec.rb +625 -0
- data/spec/api_client_spec.rb +235 -0
- data/spec/configuration_spec.rb +51 -0
- data/spec/models/account_serializer_spec.rb +111 -0
- data/spec/models/cashout_calculation_serializer_spec.rb +63 -0
- data/spec/models/cashout_serializer_spec.rb +135 -0
- data/spec/models/cashout_slice_serializer_spec.rb +69 -0
- data/spec/models/company_information_serializer_spec.rb +111 -0
- data/spec/models/contact_info_serializer_spec.rb +63 -0
- data/spec/models/contact_information_serializer_spec.rb +99 -0
- data/spec/models/contractor_serializer_spec.rb +127 -0
- data/spec/models/income_nested_serializer_spec.rb +111 -0
- data/spec/models/income_serializer_fixed_source_spec.rb +111 -0
- data/spec/models/income_serializer_spec.rb +111 -0
- data/spec/models/invoice_serializer_fixed_source_create_spec.rb +105 -0
- data/spec/models/invoice_serializer_spec.rb +105 -0
- data/spec/models/json_web_token_serializer_spec.rb +45 -0
- data/spec/models/manager_platform_serializer_spec.rb +143 -0
- data/spec/models/manager_serializer_spec.rb +63 -0
- data/spec/models/membership_serializer_spec.rb +57 -0
- data/spec/models/personal_information_serializer_spec.rb +99 -0
- data/spec/models/plaid_public_token_serializer_spec.rb +51 -0
- data/spec/models/platform_income_request_serializer_spec.rb +97 -0
- data/spec/models/platform_membership_request_serializer_spec.rb +73 -0
- data/spec/models/platform_serializer_spec.rb +191 -0
- data/spec/models/platform_summary_serializer_spec.rb +63 -0
- data/spec/models/rebate_serializer_spec.rb +93 -0
- data/spec/models/receivables_serializer_spec.rb +57 -0
- data/spec/models/tax_savings_serializer_spec.rb +63 -0
- data/spec/models/user_account_serializer_spec.rb +105 -0
- data/spec/models/user_cashout_serializer_spec.rb +135 -0
- data/spec/models/user_income_request_serializer_spec.rb +97 -0
- data/spec/models/user_platform_membership_request_serializer_spec.rb +85 -0
- data/spec/models/user_serializer_spec.rb +251 -0
- data/spec/models/write_account_serializer_spec.rb +99 -0
- data/spec/models/write_cashout_calculation_serializer_spec.rb +51 -0
- data/spec/models/write_cashout_serializer_spec.rb +107 -0
- data/spec/models/write_cashout_slice_serializer_spec.rb +69 -0
- data/spec/models/write_company_information_serializer_spec.rb +105 -0
- data/spec/models/write_contact_info_serializer_spec.rb +63 -0
- data/spec/models/write_contact_information_serializer_spec.rb +93 -0
- data/spec/models/write_contractor_serializer_spec.rb +91 -0
- data/spec/models/write_income_nested_serializer_spec.rb +75 -0
- data/spec/models/write_income_serializer_fixed_source_spec.rb +75 -0
- data/spec/models/write_income_serializer_spec.rb +81 -0
- data/spec/models/write_invoice_serializer_fixed_source_create_spec.rb +57 -0
- data/spec/models/write_invoice_serializer_spec.rb +81 -0
- data/spec/models/write_json_web_token_serializer_spec.rb +45 -0
- data/spec/models/write_manager_platform_serializer_spec.rb +101 -0
- data/spec/models/write_manager_serializer_spec.rb +51 -0
- data/spec/models/write_membership_serializer_spec.rb +51 -0
- data/spec/models/write_personal_information_serializer_spec.rb +99 -0
- data/spec/models/write_plaid_public_token_serializer_spec.rb +51 -0
- data/spec/models/write_platform_income_request_serializer_spec.rb +63 -0
- data/spec/models/write_platform_membership_request_serializer_spec.rb +45 -0
- data/spec/models/write_platform_serializer_spec.rb +117 -0
- data/spec/models/write_platform_summary_serializer_spec.rb +51 -0
- data/spec/models/write_rebate_serializer_spec.rb +57 -0
- data/spec/models/write_receivables_serializer_spec.rb +51 -0
- data/spec/models/write_tax_savings_serializer_spec.rb +51 -0
- data/spec/models/write_user_account_serializer_spec.rb +87 -0
- data/spec/models/write_user_cashout_serializer_spec.rb +101 -0
- data/spec/models/write_user_income_request_serializer_spec.rb +63 -0
- data/spec/models/write_user_platform_membership_request_serializer_spec.rb +57 -0
- data/spec/models/write_user_serializer_spec.rb +133 -0
- data/spec/spec_helper.rb +120 -0
- data/swagger-codegen-config.json +9 -0
- metadata +527 -0
|
@@ -0,0 +1,592 @@
|
|
|
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 'date'
|
|
23
|
+
|
|
24
|
+
module QwilAPI
|
|
25
|
+
|
|
26
|
+
class UserSerializer
|
|
27
|
+
attr_accessor :url
|
|
28
|
+
|
|
29
|
+
attr_accessor :email
|
|
30
|
+
|
|
31
|
+
# DEPRECATED: The full name of the contractor. Use first_name/last_name instead.
|
|
32
|
+
attr_accessor :name
|
|
33
|
+
|
|
34
|
+
# First name, if the user is an individual. Leave blank if this user is a company.
|
|
35
|
+
attr_accessor :first_name
|
|
36
|
+
|
|
37
|
+
# Last name, if the user is an individual. Leave blank if this user is a company.
|
|
38
|
+
attr_accessor :last_name
|
|
39
|
+
|
|
40
|
+
# Business name. Only use this field if this user is a business entity.
|
|
41
|
+
attr_accessor :business_name
|
|
42
|
+
|
|
43
|
+
attr_accessor :contractor_type
|
|
44
|
+
|
|
45
|
+
# Default account to use for payment of unpaid income.
|
|
46
|
+
attr_accessor :default_account
|
|
47
|
+
|
|
48
|
+
# Status of the User's KYC check.
|
|
49
|
+
attr_accessor :kyc_status
|
|
50
|
+
|
|
51
|
+
# Account to use for tax savings.
|
|
52
|
+
attr_accessor :tax_savings_account
|
|
53
|
+
|
|
54
|
+
# The percent of income to be withheld for tax savings purposes.
|
|
55
|
+
attr_accessor :tax_savings_percent
|
|
56
|
+
|
|
57
|
+
# Feature flag specifying if Plaid integration should be used.
|
|
58
|
+
attr_accessor :use_plaid
|
|
59
|
+
|
|
60
|
+
# Feature flag specifying if IncomeRequests should be enabled for this user.
|
|
61
|
+
attr_accessor :use_income_requests
|
|
62
|
+
|
|
63
|
+
# Feature flag specifying if tax savings should be enabled.
|
|
64
|
+
attr_accessor :use_tax_savings
|
|
65
|
+
|
|
66
|
+
# Whether or not all income should be immediately cashed out for this user.
|
|
67
|
+
attr_accessor :is_auto_cashout_enabled
|
|
68
|
+
|
|
69
|
+
# URL of the endpoint describing the User's Income.
|
|
70
|
+
attr_accessor :income
|
|
71
|
+
|
|
72
|
+
# URL of the endpoint describing the User's Cashouts.
|
|
73
|
+
attr_accessor :cashouts
|
|
74
|
+
|
|
75
|
+
# URL of the endpoint describing the User's Cashouts.
|
|
76
|
+
attr_accessor :receivables
|
|
77
|
+
|
|
78
|
+
# URL of the endpoint describing the User's Accounts.
|
|
79
|
+
attr_accessor :accounts
|
|
80
|
+
|
|
81
|
+
# The platforms that this User is an Admin for.
|
|
82
|
+
attr_accessor :administered_platforms
|
|
83
|
+
|
|
84
|
+
# The dollar amount available for Cashout.
|
|
85
|
+
attr_accessor :cashout_available
|
|
86
|
+
|
|
87
|
+
# The dollar amount of Income not yet paid (Cashout/Rebate).
|
|
88
|
+
attr_accessor :unpaid_income
|
|
89
|
+
|
|
90
|
+
# URL for tax savings information for the given User.
|
|
91
|
+
attr_accessor :tax_savings
|
|
92
|
+
|
|
93
|
+
# URL of the platform that the User is contracting for.
|
|
94
|
+
attr_accessor :platform
|
|
95
|
+
|
|
96
|
+
attr_accessor :platform_summary
|
|
97
|
+
|
|
98
|
+
# URL of the list of platform membership requests.
|
|
99
|
+
attr_accessor :platform_membership_requests
|
|
100
|
+
|
|
101
|
+
# URL of the list of income requests.
|
|
102
|
+
attr_accessor :income_requests
|
|
103
|
+
|
|
104
|
+
# Flag specifying if the User has access to the Platform Admin UI.
|
|
105
|
+
attr_accessor :is_platform_admin
|
|
106
|
+
|
|
107
|
+
# Flag specifying if the User has set their password.
|
|
108
|
+
attr_accessor :has_password
|
|
109
|
+
|
|
110
|
+
# Percentage amount charged for each Cashout.
|
|
111
|
+
attr_accessor :cashout_fee_percent
|
|
112
|
+
|
|
113
|
+
attr_accessor :personal_information
|
|
114
|
+
|
|
115
|
+
# Calculate what fees would be charged for a specific Cashout amount.
|
|
116
|
+
attr_accessor :calculate_cashout_available
|
|
117
|
+
|
|
118
|
+
attr_accessor :managers
|
|
119
|
+
|
|
120
|
+
class EnumAttributeValidator
|
|
121
|
+
attr_reader :datatype
|
|
122
|
+
attr_reader :allowable_values
|
|
123
|
+
|
|
124
|
+
def initialize(datatype, allowable_values)
|
|
125
|
+
@allowable_values = allowable_values.map do |value|
|
|
126
|
+
case datatype.to_s
|
|
127
|
+
when /Integer/i
|
|
128
|
+
value.to_i
|
|
129
|
+
when /Float/i
|
|
130
|
+
value.to_f
|
|
131
|
+
else
|
|
132
|
+
value
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def valid?(value)
|
|
138
|
+
!value || allowable_values.include?(value)
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
143
|
+
def self.attribute_map
|
|
144
|
+
{
|
|
145
|
+
:'url' => :'url',
|
|
146
|
+
:'email' => :'email',
|
|
147
|
+
:'name' => :'name',
|
|
148
|
+
:'first_name' => :'first_name',
|
|
149
|
+
:'last_name' => :'last_name',
|
|
150
|
+
:'business_name' => :'business_name',
|
|
151
|
+
:'contractor_type' => :'contractor_type',
|
|
152
|
+
:'default_account' => :'default_account',
|
|
153
|
+
:'kyc_status' => :'kyc_status',
|
|
154
|
+
:'tax_savings_account' => :'tax_savings_account',
|
|
155
|
+
:'tax_savings_percent' => :'tax_savings_percent',
|
|
156
|
+
:'use_plaid' => :'use_plaid',
|
|
157
|
+
:'use_income_requests' => :'use_income_requests',
|
|
158
|
+
:'use_tax_savings' => :'use_tax_savings',
|
|
159
|
+
:'is_auto_cashout_enabled' => :'is_auto_cashout_enabled',
|
|
160
|
+
:'income' => :'income',
|
|
161
|
+
:'cashouts' => :'cashouts',
|
|
162
|
+
:'receivables' => :'receivables',
|
|
163
|
+
:'accounts' => :'accounts',
|
|
164
|
+
:'administered_platforms' => :'administered_platforms',
|
|
165
|
+
:'cashout_available' => :'cashout_available',
|
|
166
|
+
:'unpaid_income' => :'unpaid_income',
|
|
167
|
+
:'tax_savings' => :'tax_savings',
|
|
168
|
+
:'platform' => :'platform',
|
|
169
|
+
:'platform_summary' => :'platform_summary',
|
|
170
|
+
:'platform_membership_requests' => :'platform_membership_requests',
|
|
171
|
+
:'income_requests' => :'income_requests',
|
|
172
|
+
:'is_platform_admin' => :'is_platform_admin',
|
|
173
|
+
:'has_password' => :'has_password',
|
|
174
|
+
:'cashout_fee_percent' => :'cashout_fee_percent',
|
|
175
|
+
:'personal_information' => :'personal_information',
|
|
176
|
+
:'calculate_cashout_available' => :'calculate_cashout_available',
|
|
177
|
+
:'managers' => :'managers'
|
|
178
|
+
}
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Attribute type mapping.
|
|
182
|
+
def self.swagger_types
|
|
183
|
+
{
|
|
184
|
+
:'url' => :'String',
|
|
185
|
+
:'email' => :'String',
|
|
186
|
+
:'name' => :'String',
|
|
187
|
+
:'first_name' => :'String',
|
|
188
|
+
:'last_name' => :'String',
|
|
189
|
+
:'business_name' => :'String',
|
|
190
|
+
:'contractor_type' => :'String',
|
|
191
|
+
:'default_account' => :'String',
|
|
192
|
+
:'kyc_status' => :'String',
|
|
193
|
+
:'tax_savings_account' => :'String',
|
|
194
|
+
:'tax_savings_percent' => :'String',
|
|
195
|
+
:'use_plaid' => :'BOOLEAN',
|
|
196
|
+
:'use_income_requests' => :'BOOLEAN',
|
|
197
|
+
:'use_tax_savings' => :'BOOLEAN',
|
|
198
|
+
:'is_auto_cashout_enabled' => :'BOOLEAN',
|
|
199
|
+
:'income' => :'String',
|
|
200
|
+
:'cashouts' => :'String',
|
|
201
|
+
:'receivables' => :'String',
|
|
202
|
+
:'accounts' => :'String',
|
|
203
|
+
:'administered_platforms' => :'String',
|
|
204
|
+
:'cashout_available' => :'String',
|
|
205
|
+
:'unpaid_income' => :'String',
|
|
206
|
+
:'tax_savings' => :'String',
|
|
207
|
+
:'platform' => :'String',
|
|
208
|
+
:'platform_summary' => :'PlatformSummarySerializer',
|
|
209
|
+
:'platform_membership_requests' => :'String',
|
|
210
|
+
:'income_requests' => :'String',
|
|
211
|
+
:'is_platform_admin' => :'String',
|
|
212
|
+
:'has_password' => :'String',
|
|
213
|
+
:'cashout_fee_percent' => :'String',
|
|
214
|
+
:'personal_information' => :'PersonalInformationSerializer',
|
|
215
|
+
:'calculate_cashout_available' => :'String',
|
|
216
|
+
:'managers' => :'Array<String>'
|
|
217
|
+
}
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Initializes the object
|
|
221
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
222
|
+
def initialize(attributes = {})
|
|
223
|
+
return unless attributes.is_a?(Hash)
|
|
224
|
+
|
|
225
|
+
# convert string to symbol for hash key
|
|
226
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
227
|
+
|
|
228
|
+
if attributes.has_key?(:'url')
|
|
229
|
+
self.url = attributes[:'url']
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
if attributes.has_key?(:'email')
|
|
233
|
+
self.email = attributes[:'email']
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
if attributes.has_key?(:'name')
|
|
237
|
+
self.name = attributes[:'name']
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
if attributes.has_key?(:'first_name')
|
|
241
|
+
self.first_name = attributes[:'first_name']
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
if attributes.has_key?(:'last_name')
|
|
245
|
+
self.last_name = attributes[:'last_name']
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
if attributes.has_key?(:'business_name')
|
|
249
|
+
self.business_name = attributes[:'business_name']
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
if attributes.has_key?(:'contractor_type')
|
|
253
|
+
self.contractor_type = attributes[:'contractor_type']
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
if attributes.has_key?(:'default_account')
|
|
257
|
+
self.default_account = attributes[:'default_account']
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
if attributes.has_key?(:'kyc_status')
|
|
261
|
+
self.kyc_status = attributes[:'kyc_status']
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
if attributes.has_key?(:'tax_savings_account')
|
|
265
|
+
self.tax_savings_account = attributes[:'tax_savings_account']
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
if attributes.has_key?(:'tax_savings_percent')
|
|
269
|
+
self.tax_savings_percent = attributes[:'tax_savings_percent']
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
if attributes.has_key?(:'use_plaid')
|
|
273
|
+
self.use_plaid = attributes[:'use_plaid']
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
if attributes.has_key?(:'use_income_requests')
|
|
277
|
+
self.use_income_requests = attributes[:'use_income_requests']
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
if attributes.has_key?(:'use_tax_savings')
|
|
281
|
+
self.use_tax_savings = attributes[:'use_tax_savings']
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
if attributes.has_key?(:'is_auto_cashout_enabled')
|
|
285
|
+
self.is_auto_cashout_enabled = attributes[:'is_auto_cashout_enabled']
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
if attributes.has_key?(:'income')
|
|
289
|
+
self.income = attributes[:'income']
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
if attributes.has_key?(:'cashouts')
|
|
293
|
+
self.cashouts = attributes[:'cashouts']
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
if attributes.has_key?(:'receivables')
|
|
297
|
+
self.receivables = attributes[:'receivables']
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
if attributes.has_key?(:'accounts')
|
|
301
|
+
self.accounts = attributes[:'accounts']
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
if attributes.has_key?(:'administered_platforms')
|
|
305
|
+
self.administered_platforms = attributes[:'administered_platforms']
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
if attributes.has_key?(:'cashout_available')
|
|
309
|
+
self.cashout_available = attributes[:'cashout_available']
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
if attributes.has_key?(:'unpaid_income')
|
|
313
|
+
self.unpaid_income = attributes[:'unpaid_income']
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
if attributes.has_key?(:'tax_savings')
|
|
317
|
+
self.tax_savings = attributes[:'tax_savings']
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
if attributes.has_key?(:'platform')
|
|
321
|
+
self.platform = attributes[:'platform']
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
if attributes.has_key?(:'platform_summary')
|
|
325
|
+
self.platform_summary = attributes[:'platform_summary']
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
if attributes.has_key?(:'platform_membership_requests')
|
|
329
|
+
self.platform_membership_requests = attributes[:'platform_membership_requests']
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
if attributes.has_key?(:'income_requests')
|
|
333
|
+
self.income_requests = attributes[:'income_requests']
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
if attributes.has_key?(:'is_platform_admin')
|
|
337
|
+
self.is_platform_admin = attributes[:'is_platform_admin']
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
if attributes.has_key?(:'has_password')
|
|
341
|
+
self.has_password = attributes[:'has_password']
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
if attributes.has_key?(:'cashout_fee_percent')
|
|
345
|
+
self.cashout_fee_percent = attributes[:'cashout_fee_percent']
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
if attributes.has_key?(:'personal_information')
|
|
349
|
+
self.personal_information = attributes[:'personal_information']
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
if attributes.has_key?(:'calculate_cashout_available')
|
|
353
|
+
self.calculate_cashout_available = attributes[:'calculate_cashout_available']
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
if attributes.has_key?(:'managers')
|
|
357
|
+
if (value = attributes[:'managers']).is_a?(Array)
|
|
358
|
+
self.managers = value
|
|
359
|
+
end
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
365
|
+
# @return Array for valid properies with the reasons
|
|
366
|
+
def list_invalid_properties
|
|
367
|
+
invalid_properties = Array.new
|
|
368
|
+
return invalid_properties
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# Check to see if the all the properties in the model are valid
|
|
372
|
+
# @return true if the model is valid
|
|
373
|
+
def valid?
|
|
374
|
+
return false if @url.nil?
|
|
375
|
+
return false if @email.nil?
|
|
376
|
+
return false if @name.nil?
|
|
377
|
+
return false if @first_name.nil?
|
|
378
|
+
return false if @last_name.nil?
|
|
379
|
+
return false if @business_name.nil?
|
|
380
|
+
return false if @contractor_type.nil?
|
|
381
|
+
contractor_type_validator = EnumAttributeValidator.new('String', ["INDIVIDUAL", "BUSINESS"])
|
|
382
|
+
return false unless contractor_type_validator.valid?(@contractor_type)
|
|
383
|
+
return false if @default_account.nil?
|
|
384
|
+
return false if @kyc_status.nil?
|
|
385
|
+
kyc_status_validator = EnumAttributeValidator.new('String', ["NOT_CHECKED", "PENDING", "APPROVED", "DENIED"])
|
|
386
|
+
return false unless kyc_status_validator.valid?(@kyc_status)
|
|
387
|
+
return false if @tax_savings_account.nil?
|
|
388
|
+
return false if @tax_savings_percent.nil?
|
|
389
|
+
return false if @use_plaid.nil?
|
|
390
|
+
return false if @use_income_requests.nil?
|
|
391
|
+
return false if @use_tax_savings.nil?
|
|
392
|
+
return false if @is_auto_cashout_enabled.nil?
|
|
393
|
+
return false if @income.nil?
|
|
394
|
+
return false if @cashouts.nil?
|
|
395
|
+
return false if @receivables.nil?
|
|
396
|
+
return false if @accounts.nil?
|
|
397
|
+
return false if @administered_platforms.nil?
|
|
398
|
+
return false if @cashout_available.nil?
|
|
399
|
+
return false if @unpaid_income.nil?
|
|
400
|
+
return false if @tax_savings.nil?
|
|
401
|
+
return false if @platform.nil?
|
|
402
|
+
return false if @platform_summary.nil?
|
|
403
|
+
return false if @platform_membership_requests.nil?
|
|
404
|
+
return false if @income_requests.nil?
|
|
405
|
+
return false if @is_platform_admin.nil?
|
|
406
|
+
return false if @has_password.nil?
|
|
407
|
+
return false if @cashout_fee_percent.nil?
|
|
408
|
+
return false if @personal_information.nil?
|
|
409
|
+
return false if @calculate_cashout_available.nil?
|
|
410
|
+
return false if @managers.nil?
|
|
411
|
+
return true
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
415
|
+
# @param [Object] contractor_type Object to be assigned
|
|
416
|
+
def contractor_type=(contractor_type)
|
|
417
|
+
validator = EnumAttributeValidator.new('String', ["INDIVIDUAL", "BUSINESS"])
|
|
418
|
+
unless validator.valid?(contractor_type)
|
|
419
|
+
fail ArgumentError, "invalid value for 'contractor_type', must be one of #{validator.allowable_values}."
|
|
420
|
+
end
|
|
421
|
+
@contractor_type = contractor_type
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
425
|
+
# @param [Object] kyc_status Object to be assigned
|
|
426
|
+
def kyc_status=(kyc_status)
|
|
427
|
+
validator = EnumAttributeValidator.new('String', ["NOT_CHECKED", "PENDING", "APPROVED", "DENIED"])
|
|
428
|
+
unless validator.valid?(kyc_status)
|
|
429
|
+
fail ArgumentError, "invalid value for 'kyc_status', must be one of #{validator.allowable_values}."
|
|
430
|
+
end
|
|
431
|
+
@kyc_status = kyc_status
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# Checks equality by comparing each attribute.
|
|
435
|
+
# @param [Object] Object to be compared
|
|
436
|
+
def ==(o)
|
|
437
|
+
return true if self.equal?(o)
|
|
438
|
+
self.class == o.class &&
|
|
439
|
+
url == o.url &&
|
|
440
|
+
email == o.email &&
|
|
441
|
+
name == o.name &&
|
|
442
|
+
first_name == o.first_name &&
|
|
443
|
+
last_name == o.last_name &&
|
|
444
|
+
business_name == o.business_name &&
|
|
445
|
+
contractor_type == o.contractor_type &&
|
|
446
|
+
default_account == o.default_account &&
|
|
447
|
+
kyc_status == o.kyc_status &&
|
|
448
|
+
tax_savings_account == o.tax_savings_account &&
|
|
449
|
+
tax_savings_percent == o.tax_savings_percent &&
|
|
450
|
+
use_plaid == o.use_plaid &&
|
|
451
|
+
use_income_requests == o.use_income_requests &&
|
|
452
|
+
use_tax_savings == o.use_tax_savings &&
|
|
453
|
+
is_auto_cashout_enabled == o.is_auto_cashout_enabled &&
|
|
454
|
+
income == o.income &&
|
|
455
|
+
cashouts == o.cashouts &&
|
|
456
|
+
receivables == o.receivables &&
|
|
457
|
+
accounts == o.accounts &&
|
|
458
|
+
administered_platforms == o.administered_platforms &&
|
|
459
|
+
cashout_available == o.cashout_available &&
|
|
460
|
+
unpaid_income == o.unpaid_income &&
|
|
461
|
+
tax_savings == o.tax_savings &&
|
|
462
|
+
platform == o.platform &&
|
|
463
|
+
platform_summary == o.platform_summary &&
|
|
464
|
+
platform_membership_requests == o.platform_membership_requests &&
|
|
465
|
+
income_requests == o.income_requests &&
|
|
466
|
+
is_platform_admin == o.is_platform_admin &&
|
|
467
|
+
has_password == o.has_password &&
|
|
468
|
+
cashout_fee_percent == o.cashout_fee_percent &&
|
|
469
|
+
personal_information == o.personal_information &&
|
|
470
|
+
calculate_cashout_available == o.calculate_cashout_available &&
|
|
471
|
+
managers == o.managers
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
# @see the `==` method
|
|
475
|
+
# @param [Object] Object to be compared
|
|
476
|
+
def eql?(o)
|
|
477
|
+
self == o
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
# Calculates hash code according to all attributes.
|
|
481
|
+
# @return [Fixnum] Hash code
|
|
482
|
+
def hash
|
|
483
|
+
[url, email, name, first_name, last_name, business_name, contractor_type, default_account, kyc_status, tax_savings_account, tax_savings_percent, use_plaid, use_income_requests, use_tax_savings, is_auto_cashout_enabled, income, cashouts, receivables, accounts, administered_platforms, cashout_available, unpaid_income, tax_savings, platform, platform_summary, platform_membership_requests, income_requests, is_platform_admin, has_password, cashout_fee_percent, personal_information, calculate_cashout_available, managers].hash
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
# Builds the object from hash
|
|
487
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
488
|
+
# @return [Object] Returns the model itself
|
|
489
|
+
def build_from_hash(attributes)
|
|
490
|
+
return nil unless attributes.is_a?(Hash)
|
|
491
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
492
|
+
if type =~ /^Array<(.*)>/i
|
|
493
|
+
# check to ensure the input is an array given that the the attribute
|
|
494
|
+
# is documented as an array but the input is not
|
|
495
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
496
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
497
|
+
end
|
|
498
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
499
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
500
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
self
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
# Deserializes the data based on type
|
|
507
|
+
# @param string type Data type
|
|
508
|
+
# @param string value Value to be deserialized
|
|
509
|
+
# @return [Object] Deserialized data
|
|
510
|
+
def _deserialize(type, value)
|
|
511
|
+
case type.to_sym
|
|
512
|
+
when :DateTime
|
|
513
|
+
DateTime.parse(value)
|
|
514
|
+
when :Date
|
|
515
|
+
Date.parse(value)
|
|
516
|
+
when :String
|
|
517
|
+
value.to_s
|
|
518
|
+
when :Integer
|
|
519
|
+
value.to_i
|
|
520
|
+
when :Float
|
|
521
|
+
value.to_f
|
|
522
|
+
when :BOOLEAN
|
|
523
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
524
|
+
true
|
|
525
|
+
else
|
|
526
|
+
false
|
|
527
|
+
end
|
|
528
|
+
when :Object
|
|
529
|
+
# generic object (usually a Hash), return directly
|
|
530
|
+
value
|
|
531
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
532
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
533
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
534
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
535
|
+
k_type = Regexp.last_match[:k_type]
|
|
536
|
+
v_type = Regexp.last_match[:v_type]
|
|
537
|
+
{}.tap do |hash|
|
|
538
|
+
value.each do |k, v|
|
|
539
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
540
|
+
end
|
|
541
|
+
end
|
|
542
|
+
else # model
|
|
543
|
+
temp_model = QwilAPI.const_get(type).new
|
|
544
|
+
temp_model.build_from_hash(value)
|
|
545
|
+
end
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
# Returns the string representation of the object
|
|
549
|
+
# @return [String] String presentation of the object
|
|
550
|
+
def to_s
|
|
551
|
+
to_hash.to_s
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
555
|
+
# @return [Hash] Returns the object in the form of hash
|
|
556
|
+
def to_body
|
|
557
|
+
to_hash
|
|
558
|
+
end
|
|
559
|
+
|
|
560
|
+
# Returns the object in the form of hash
|
|
561
|
+
# @return [Hash] Returns the object in the form of hash
|
|
562
|
+
def to_hash
|
|
563
|
+
hash = {}
|
|
564
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
565
|
+
value = self.send(attr)
|
|
566
|
+
next if value.nil?
|
|
567
|
+
hash[param] = _to_hash(value)
|
|
568
|
+
end
|
|
569
|
+
hash
|
|
570
|
+
end
|
|
571
|
+
|
|
572
|
+
# Outputs non-array value in the form of hash
|
|
573
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
574
|
+
# @param [Object] value Any valid value
|
|
575
|
+
# @return [Hash] Returns the value in the form of hash
|
|
576
|
+
def _to_hash(value)
|
|
577
|
+
if value.is_a?(Array)
|
|
578
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
579
|
+
elsif value.is_a?(Hash)
|
|
580
|
+
{}.tap do |hash|
|
|
581
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
582
|
+
end
|
|
583
|
+
elsif value.respond_to? :to_hash
|
|
584
|
+
value.to_hash
|
|
585
|
+
else
|
|
586
|
+
value
|
|
587
|
+
end
|
|
588
|
+
end
|
|
589
|
+
|
|
590
|
+
end
|
|
591
|
+
|
|
592
|
+
end
|