qwil_api 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,480 @@
|
|
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 PlatformSerializer
|
27
|
+
attr_accessor :url
|
28
|
+
|
29
|
+
attr_accessor :contractors
|
30
|
+
|
31
|
+
attr_accessor :income
|
32
|
+
|
33
|
+
attr_accessor :invoices
|
34
|
+
|
35
|
+
attr_accessor :create_invoice
|
36
|
+
|
37
|
+
# URL of the list of platform membership requests.
|
38
|
+
attr_accessor :membership_requests
|
39
|
+
|
40
|
+
# URL of the list of income requests.
|
41
|
+
attr_accessor :income_requests
|
42
|
+
|
43
|
+
# URL of the list of Platform Memberships.
|
44
|
+
attr_accessor :memberships
|
45
|
+
|
46
|
+
attr_accessor :name
|
47
|
+
|
48
|
+
# The frequency of contractor rebates on this platform.
|
49
|
+
attr_accessor :payment_schedule
|
50
|
+
|
51
|
+
# The date that the first payment is due for the platform's pay cycle.
|
52
|
+
attr_accessor :payment_date
|
53
|
+
|
54
|
+
# Flag specifying if the Platform's Invoices should be debited automatically.
|
55
|
+
attr_accessor :automatic_debit
|
56
|
+
|
57
|
+
# The ISO 4217 currency code for which all payments for this Platform are handled. Note: Immutable after Platform is created.
|
58
|
+
attr_accessor :currency
|
59
|
+
|
60
|
+
attr_accessor :thumbnail_url
|
61
|
+
|
62
|
+
# If True, this platform is has been validated as a real company.
|
63
|
+
attr_accessor :validated
|
64
|
+
|
65
|
+
# If True, this platform is featured in the search list.
|
66
|
+
attr_accessor :featured
|
67
|
+
|
68
|
+
# If True, all users on this platform are demo users, and no payments will be debited/credited.
|
69
|
+
attr_accessor :is_demo_platform
|
70
|
+
|
71
|
+
# If True, this platform can enable the Xero integration.
|
72
|
+
attr_accessor :xero_enabled
|
73
|
+
|
74
|
+
# If True, enable experimental IncomeRequest UI for this User.
|
75
|
+
attr_accessor :use_income_requests
|
76
|
+
|
77
|
+
# Flag indicating if we should send any emails to Users on this Platform. If not set, email checks fall through to global defaults.
|
78
|
+
attr_accessor :enable_emails
|
79
|
+
|
80
|
+
# The account to use for billing purposes.
|
81
|
+
attr_accessor :default_account
|
82
|
+
|
83
|
+
attr_accessor :manager
|
84
|
+
|
85
|
+
# The accounts configured for billing on this Platform.
|
86
|
+
attr_accessor :accounts
|
87
|
+
|
88
|
+
class EnumAttributeValidator
|
89
|
+
attr_reader :datatype
|
90
|
+
attr_reader :allowable_values
|
91
|
+
|
92
|
+
def initialize(datatype, allowable_values)
|
93
|
+
@allowable_values = allowable_values.map do |value|
|
94
|
+
case datatype.to_s
|
95
|
+
when /Integer/i
|
96
|
+
value.to_i
|
97
|
+
when /Float/i
|
98
|
+
value.to_f
|
99
|
+
else
|
100
|
+
value
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
def valid?(value)
|
106
|
+
!value || allowable_values.include?(value)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
111
|
+
def self.attribute_map
|
112
|
+
{
|
113
|
+
:'url' => :'url',
|
114
|
+
:'contractors' => :'contractors',
|
115
|
+
:'income' => :'income',
|
116
|
+
:'invoices' => :'invoices',
|
117
|
+
:'create_invoice' => :'create_invoice',
|
118
|
+
:'membership_requests' => :'membership_requests',
|
119
|
+
:'income_requests' => :'income_requests',
|
120
|
+
:'memberships' => :'memberships',
|
121
|
+
:'name' => :'name',
|
122
|
+
:'payment_schedule' => :'payment_schedule',
|
123
|
+
:'payment_date' => :'payment_date',
|
124
|
+
:'automatic_debit' => :'automatic_debit',
|
125
|
+
:'currency' => :'currency',
|
126
|
+
:'thumbnail_url' => :'thumbnail_url',
|
127
|
+
:'validated' => :'validated',
|
128
|
+
:'featured' => :'featured',
|
129
|
+
:'is_demo_platform' => :'is_demo_platform',
|
130
|
+
:'xero_enabled' => :'xero_enabled',
|
131
|
+
:'use_income_requests' => :'use_income_requests',
|
132
|
+
:'enable_emails' => :'enable_emails',
|
133
|
+
:'default_account' => :'default_account',
|
134
|
+
:'manager' => :'manager',
|
135
|
+
:'accounts' => :'accounts'
|
136
|
+
}
|
137
|
+
end
|
138
|
+
|
139
|
+
# Attribute type mapping.
|
140
|
+
def self.swagger_types
|
141
|
+
{
|
142
|
+
:'url' => :'String',
|
143
|
+
:'contractors' => :'String',
|
144
|
+
:'income' => :'String',
|
145
|
+
:'invoices' => :'String',
|
146
|
+
:'create_invoice' => :'String',
|
147
|
+
:'membership_requests' => :'String',
|
148
|
+
:'income_requests' => :'String',
|
149
|
+
:'memberships' => :'String',
|
150
|
+
:'name' => :'String',
|
151
|
+
:'payment_schedule' => :'String',
|
152
|
+
:'payment_date' => :'Date',
|
153
|
+
:'automatic_debit' => :'BOOLEAN',
|
154
|
+
:'currency' => :'String',
|
155
|
+
:'thumbnail_url' => :'String',
|
156
|
+
:'validated' => :'BOOLEAN',
|
157
|
+
:'featured' => :'BOOLEAN',
|
158
|
+
:'is_demo_platform' => :'BOOLEAN',
|
159
|
+
:'xero_enabled' => :'BOOLEAN',
|
160
|
+
:'use_income_requests' => :'BOOLEAN',
|
161
|
+
:'enable_emails' => :'BOOLEAN',
|
162
|
+
:'default_account' => :'String',
|
163
|
+
:'manager' => :'String',
|
164
|
+
:'accounts' => :'Array<String>'
|
165
|
+
}
|
166
|
+
end
|
167
|
+
|
168
|
+
# Initializes the object
|
169
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
170
|
+
def initialize(attributes = {})
|
171
|
+
return unless attributes.is_a?(Hash)
|
172
|
+
|
173
|
+
# convert string to symbol for hash key
|
174
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
175
|
+
|
176
|
+
if attributes.has_key?(:'url')
|
177
|
+
self.url = attributes[:'url']
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.has_key?(:'contractors')
|
181
|
+
self.contractors = attributes[:'contractors']
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes.has_key?(:'income')
|
185
|
+
self.income = attributes[:'income']
|
186
|
+
end
|
187
|
+
|
188
|
+
if attributes.has_key?(:'invoices')
|
189
|
+
self.invoices = attributes[:'invoices']
|
190
|
+
end
|
191
|
+
|
192
|
+
if attributes.has_key?(:'create_invoice')
|
193
|
+
self.create_invoice = attributes[:'create_invoice']
|
194
|
+
end
|
195
|
+
|
196
|
+
if attributes.has_key?(:'membership_requests')
|
197
|
+
self.membership_requests = attributes[:'membership_requests']
|
198
|
+
end
|
199
|
+
|
200
|
+
if attributes.has_key?(:'income_requests')
|
201
|
+
self.income_requests = attributes[:'income_requests']
|
202
|
+
end
|
203
|
+
|
204
|
+
if attributes.has_key?(:'memberships')
|
205
|
+
self.memberships = attributes[:'memberships']
|
206
|
+
end
|
207
|
+
|
208
|
+
if attributes.has_key?(:'name')
|
209
|
+
self.name = attributes[:'name']
|
210
|
+
end
|
211
|
+
|
212
|
+
if attributes.has_key?(:'payment_schedule')
|
213
|
+
self.payment_schedule = attributes[:'payment_schedule']
|
214
|
+
end
|
215
|
+
|
216
|
+
if attributes.has_key?(:'payment_date')
|
217
|
+
self.payment_date = attributes[:'payment_date']
|
218
|
+
end
|
219
|
+
|
220
|
+
if attributes.has_key?(:'automatic_debit')
|
221
|
+
self.automatic_debit = attributes[:'automatic_debit']
|
222
|
+
end
|
223
|
+
|
224
|
+
if attributes.has_key?(:'currency')
|
225
|
+
self.currency = attributes[:'currency']
|
226
|
+
end
|
227
|
+
|
228
|
+
if attributes.has_key?(:'thumbnail_url')
|
229
|
+
self.thumbnail_url = attributes[:'thumbnail_url']
|
230
|
+
end
|
231
|
+
|
232
|
+
if attributes.has_key?(:'validated')
|
233
|
+
self.validated = attributes[:'validated']
|
234
|
+
end
|
235
|
+
|
236
|
+
if attributes.has_key?(:'featured')
|
237
|
+
self.featured = attributes[:'featured']
|
238
|
+
end
|
239
|
+
|
240
|
+
if attributes.has_key?(:'is_demo_platform')
|
241
|
+
self.is_demo_platform = attributes[:'is_demo_platform']
|
242
|
+
end
|
243
|
+
|
244
|
+
if attributes.has_key?(:'xero_enabled')
|
245
|
+
self.xero_enabled = attributes[:'xero_enabled']
|
246
|
+
end
|
247
|
+
|
248
|
+
if attributes.has_key?(:'use_income_requests')
|
249
|
+
self.use_income_requests = attributes[:'use_income_requests']
|
250
|
+
end
|
251
|
+
|
252
|
+
if attributes.has_key?(:'enable_emails')
|
253
|
+
self.enable_emails = attributes[:'enable_emails']
|
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?(:'manager')
|
261
|
+
self.manager = attributes[:'manager']
|
262
|
+
end
|
263
|
+
|
264
|
+
if attributes.has_key?(:'accounts')
|
265
|
+
if (value = attributes[:'accounts']).is_a?(Array)
|
266
|
+
self.accounts = value
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
end
|
271
|
+
|
272
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
273
|
+
# @return Array for valid properies with the reasons
|
274
|
+
def list_invalid_properties
|
275
|
+
invalid_properties = Array.new
|
276
|
+
return invalid_properties
|
277
|
+
end
|
278
|
+
|
279
|
+
# Check to see if the all the properties in the model are valid
|
280
|
+
# @return true if the model is valid
|
281
|
+
def valid?
|
282
|
+
return false if @url.nil?
|
283
|
+
return false if @contractors.nil?
|
284
|
+
return false if @income.nil?
|
285
|
+
return false if @invoices.nil?
|
286
|
+
return false if @create_invoice.nil?
|
287
|
+
return false if @membership_requests.nil?
|
288
|
+
return false if @income_requests.nil?
|
289
|
+
return false if @memberships.nil?
|
290
|
+
return false if @name.nil?
|
291
|
+
return false if @payment_schedule.nil?
|
292
|
+
payment_schedule_validator = EnumAttributeValidator.new('String', ["WEEKLY", "FORTNIGHT", "MONTHLY", "DAILY"])
|
293
|
+
return false unless payment_schedule_validator.valid?(@payment_schedule)
|
294
|
+
return false if @payment_date.nil?
|
295
|
+
return false if @automatic_debit.nil?
|
296
|
+
return false if @currency.nil?
|
297
|
+
currency_validator = EnumAttributeValidator.new('String', ["USD", "GBP"])
|
298
|
+
return false unless currency_validator.valid?(@currency)
|
299
|
+
return false if @thumbnail_url.nil?
|
300
|
+
return false if @validated.nil?
|
301
|
+
return false if @featured.nil?
|
302
|
+
return false if @is_demo_platform.nil?
|
303
|
+
return false if @xero_enabled.nil?
|
304
|
+
return false if @use_income_requests.nil?
|
305
|
+
return false if @enable_emails.nil?
|
306
|
+
return false if @default_account.nil?
|
307
|
+
return false if @manager.nil?
|
308
|
+
return false if @accounts.nil?
|
309
|
+
return true
|
310
|
+
end
|
311
|
+
|
312
|
+
# Custom attribute writer method checking allowed values (enum).
|
313
|
+
# @param [Object] payment_schedule Object to be assigned
|
314
|
+
def payment_schedule=(payment_schedule)
|
315
|
+
validator = EnumAttributeValidator.new('String', ["WEEKLY", "FORTNIGHT", "MONTHLY", "DAILY"])
|
316
|
+
unless validator.valid?(payment_schedule)
|
317
|
+
fail ArgumentError, "invalid value for 'payment_schedule', must be one of #{validator.allowable_values}."
|
318
|
+
end
|
319
|
+
@payment_schedule = payment_schedule
|
320
|
+
end
|
321
|
+
|
322
|
+
# Custom attribute writer method checking allowed values (enum).
|
323
|
+
# @param [Object] currency Object to be assigned
|
324
|
+
def currency=(currency)
|
325
|
+
validator = EnumAttributeValidator.new('String', ["USD", "GBP"])
|
326
|
+
unless validator.valid?(currency)
|
327
|
+
fail ArgumentError, "invalid value for 'currency', must be one of #{validator.allowable_values}."
|
328
|
+
end
|
329
|
+
@currency = currency
|
330
|
+
end
|
331
|
+
|
332
|
+
# Checks equality by comparing each attribute.
|
333
|
+
# @param [Object] Object to be compared
|
334
|
+
def ==(o)
|
335
|
+
return true if self.equal?(o)
|
336
|
+
self.class == o.class &&
|
337
|
+
url == o.url &&
|
338
|
+
contractors == o.contractors &&
|
339
|
+
income == o.income &&
|
340
|
+
invoices == o.invoices &&
|
341
|
+
create_invoice == o.create_invoice &&
|
342
|
+
membership_requests == o.membership_requests &&
|
343
|
+
income_requests == o.income_requests &&
|
344
|
+
memberships == o.memberships &&
|
345
|
+
name == o.name &&
|
346
|
+
payment_schedule == o.payment_schedule &&
|
347
|
+
payment_date == o.payment_date &&
|
348
|
+
automatic_debit == o.automatic_debit &&
|
349
|
+
currency == o.currency &&
|
350
|
+
thumbnail_url == o.thumbnail_url &&
|
351
|
+
validated == o.validated &&
|
352
|
+
featured == o.featured &&
|
353
|
+
is_demo_platform == o.is_demo_platform &&
|
354
|
+
xero_enabled == o.xero_enabled &&
|
355
|
+
use_income_requests == o.use_income_requests &&
|
356
|
+
enable_emails == o.enable_emails &&
|
357
|
+
default_account == o.default_account &&
|
358
|
+
manager == o.manager &&
|
359
|
+
accounts == o.accounts
|
360
|
+
end
|
361
|
+
|
362
|
+
# @see the `==` method
|
363
|
+
# @param [Object] Object to be compared
|
364
|
+
def eql?(o)
|
365
|
+
self == o
|
366
|
+
end
|
367
|
+
|
368
|
+
# Calculates hash code according to all attributes.
|
369
|
+
# @return [Fixnum] Hash code
|
370
|
+
def hash
|
371
|
+
[url, contractors, income, invoices, create_invoice, membership_requests, income_requests, memberships, name, payment_schedule, payment_date, automatic_debit, currency, thumbnail_url, validated, featured, is_demo_platform, xero_enabled, use_income_requests, enable_emails, default_account, manager, accounts].hash
|
372
|
+
end
|
373
|
+
|
374
|
+
# Builds the object from hash
|
375
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
376
|
+
# @return [Object] Returns the model itself
|
377
|
+
def build_from_hash(attributes)
|
378
|
+
return nil unless attributes.is_a?(Hash)
|
379
|
+
self.class.swagger_types.each_pair do |key, type|
|
380
|
+
if type =~ /^Array<(.*)>/i
|
381
|
+
# check to ensure the input is an array given that the the attribute
|
382
|
+
# is documented as an array but the input is not
|
383
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
384
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
385
|
+
end
|
386
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
387
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
388
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
389
|
+
end
|
390
|
+
|
391
|
+
self
|
392
|
+
end
|
393
|
+
|
394
|
+
# Deserializes the data based on type
|
395
|
+
# @param string type Data type
|
396
|
+
# @param string value Value to be deserialized
|
397
|
+
# @return [Object] Deserialized data
|
398
|
+
def _deserialize(type, value)
|
399
|
+
case type.to_sym
|
400
|
+
when :DateTime
|
401
|
+
DateTime.parse(value)
|
402
|
+
when :Date
|
403
|
+
Date.parse(value)
|
404
|
+
when :String
|
405
|
+
value.to_s
|
406
|
+
when :Integer
|
407
|
+
value.to_i
|
408
|
+
when :Float
|
409
|
+
value.to_f
|
410
|
+
when :BOOLEAN
|
411
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
412
|
+
true
|
413
|
+
else
|
414
|
+
false
|
415
|
+
end
|
416
|
+
when :Object
|
417
|
+
# generic object (usually a Hash), return directly
|
418
|
+
value
|
419
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
420
|
+
inner_type = Regexp.last_match[:inner_type]
|
421
|
+
value.map { |v| _deserialize(inner_type, v) }
|
422
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
423
|
+
k_type = Regexp.last_match[:k_type]
|
424
|
+
v_type = Regexp.last_match[:v_type]
|
425
|
+
{}.tap do |hash|
|
426
|
+
value.each do |k, v|
|
427
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
428
|
+
end
|
429
|
+
end
|
430
|
+
else # model
|
431
|
+
temp_model = QwilAPI.const_get(type).new
|
432
|
+
temp_model.build_from_hash(value)
|
433
|
+
end
|
434
|
+
end
|
435
|
+
|
436
|
+
# Returns the string representation of the object
|
437
|
+
# @return [String] String presentation of the object
|
438
|
+
def to_s
|
439
|
+
to_hash.to_s
|
440
|
+
end
|
441
|
+
|
442
|
+
# to_body is an alias to to_hash (backward compatibility)
|
443
|
+
# @return [Hash] Returns the object in the form of hash
|
444
|
+
def to_body
|
445
|
+
to_hash
|
446
|
+
end
|
447
|
+
|
448
|
+
# Returns the object in the form of hash
|
449
|
+
# @return [Hash] Returns the object in the form of hash
|
450
|
+
def to_hash
|
451
|
+
hash = {}
|
452
|
+
self.class.attribute_map.each_pair do |attr, param|
|
453
|
+
value = self.send(attr)
|
454
|
+
next if value.nil?
|
455
|
+
hash[param] = _to_hash(value)
|
456
|
+
end
|
457
|
+
hash
|
458
|
+
end
|
459
|
+
|
460
|
+
# Outputs non-array value in the form of hash
|
461
|
+
# For object, use to_hash. Otherwise, just return the value
|
462
|
+
# @param [Object] value Any valid value
|
463
|
+
# @return [Hash] Returns the value in the form of hash
|
464
|
+
def _to_hash(value)
|
465
|
+
if value.is_a?(Array)
|
466
|
+
value.compact.map{ |v| _to_hash(v) }
|
467
|
+
elsif value.is_a?(Hash)
|
468
|
+
{}.tap do |hash|
|
469
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
470
|
+
end
|
471
|
+
elsif value.respond_to? :to_hash
|
472
|
+
value.to_hash
|
473
|
+
else
|
474
|
+
value
|
475
|
+
end
|
476
|
+
end
|
477
|
+
|
478
|
+
end
|
479
|
+
|
480
|
+
end
|
@@ -0,0 +1,218 @@
|
|
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 PlatformSummarySerializer
|
27
|
+
attr_accessor :url
|
28
|
+
|
29
|
+
attr_accessor :name
|
30
|
+
|
31
|
+
attr_accessor :thumbnail_url
|
32
|
+
|
33
|
+
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
35
|
+
def self.attribute_map
|
36
|
+
{
|
37
|
+
:'url' => :'url',
|
38
|
+
:'name' => :'name',
|
39
|
+
:'thumbnail_url' => :'thumbnail_url'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
def self.swagger_types
|
45
|
+
{
|
46
|
+
:'url' => :'String',
|
47
|
+
:'name' => :'String',
|
48
|
+
:'thumbnail_url' => :'String'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
return unless attributes.is_a?(Hash)
|
56
|
+
|
57
|
+
# convert string to symbol for hash key
|
58
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
59
|
+
|
60
|
+
if attributes.has_key?(:'url')
|
61
|
+
self.url = attributes[:'url']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.has_key?(:'name')
|
65
|
+
self.name = attributes[:'name']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.has_key?(:'thumbnail_url')
|
69
|
+
self.thumbnail_url = attributes[:'thumbnail_url']
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
75
|
+
# @return Array for valid properies with the reasons
|
76
|
+
def list_invalid_properties
|
77
|
+
invalid_properties = Array.new
|
78
|
+
return invalid_properties
|
79
|
+
end
|
80
|
+
|
81
|
+
# Check to see if the all the properties in the model are valid
|
82
|
+
# @return true if the model is valid
|
83
|
+
def valid?
|
84
|
+
return false if @url.nil?
|
85
|
+
return false if @name.nil?
|
86
|
+
return false if @thumbnail_url.nil?
|
87
|
+
return true
|
88
|
+
end
|
89
|
+
|
90
|
+
# Checks equality by comparing each attribute.
|
91
|
+
# @param [Object] Object to be compared
|
92
|
+
def ==(o)
|
93
|
+
return true if self.equal?(o)
|
94
|
+
self.class == o.class &&
|
95
|
+
url == o.url &&
|
96
|
+
name == o.name &&
|
97
|
+
thumbnail_url == o.thumbnail_url
|
98
|
+
end
|
99
|
+
|
100
|
+
# @see the `==` method
|
101
|
+
# @param [Object] Object to be compared
|
102
|
+
def eql?(o)
|
103
|
+
self == o
|
104
|
+
end
|
105
|
+
|
106
|
+
# Calculates hash code according to all attributes.
|
107
|
+
# @return [Fixnum] Hash code
|
108
|
+
def hash
|
109
|
+
[url, name, thumbnail_url].hash
|
110
|
+
end
|
111
|
+
|
112
|
+
# Builds the object from hash
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
114
|
+
# @return [Object] Returns the model itself
|
115
|
+
def build_from_hash(attributes)
|
116
|
+
return nil unless attributes.is_a?(Hash)
|
117
|
+
self.class.swagger_types.each_pair do |key, type|
|
118
|
+
if type =~ /^Array<(.*)>/i
|
119
|
+
# check to ensure the input is an array given that the the attribute
|
120
|
+
# is documented as an array but the input is not
|
121
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
122
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
123
|
+
end
|
124
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
125
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
126
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
127
|
+
end
|
128
|
+
|
129
|
+
self
|
130
|
+
end
|
131
|
+
|
132
|
+
# Deserializes the data based on type
|
133
|
+
# @param string type Data type
|
134
|
+
# @param string value Value to be deserialized
|
135
|
+
# @return [Object] Deserialized data
|
136
|
+
def _deserialize(type, value)
|
137
|
+
case type.to_sym
|
138
|
+
when :DateTime
|
139
|
+
DateTime.parse(value)
|
140
|
+
when :Date
|
141
|
+
Date.parse(value)
|
142
|
+
when :String
|
143
|
+
value.to_s
|
144
|
+
when :Integer
|
145
|
+
value.to_i
|
146
|
+
when :Float
|
147
|
+
value.to_f
|
148
|
+
when :BOOLEAN
|
149
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
150
|
+
true
|
151
|
+
else
|
152
|
+
false
|
153
|
+
end
|
154
|
+
when :Object
|
155
|
+
# generic object (usually a Hash), return directly
|
156
|
+
value
|
157
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
158
|
+
inner_type = Regexp.last_match[:inner_type]
|
159
|
+
value.map { |v| _deserialize(inner_type, v) }
|
160
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
161
|
+
k_type = Regexp.last_match[:k_type]
|
162
|
+
v_type = Regexp.last_match[:v_type]
|
163
|
+
{}.tap do |hash|
|
164
|
+
value.each do |k, v|
|
165
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
else # model
|
169
|
+
temp_model = QwilAPI.const_get(type).new
|
170
|
+
temp_model.build_from_hash(value)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
# Returns the string representation of the object
|
175
|
+
# @return [String] String presentation of the object
|
176
|
+
def to_s
|
177
|
+
to_hash.to_s
|
178
|
+
end
|
179
|
+
|
180
|
+
# to_body is an alias to to_hash (backward compatibility)
|
181
|
+
# @return [Hash] Returns the object in the form of hash
|
182
|
+
def to_body
|
183
|
+
to_hash
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns the object in the form of hash
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
188
|
+
def to_hash
|
189
|
+
hash = {}
|
190
|
+
self.class.attribute_map.each_pair do |attr, param|
|
191
|
+
value = self.send(attr)
|
192
|
+
next if value.nil?
|
193
|
+
hash[param] = _to_hash(value)
|
194
|
+
end
|
195
|
+
hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Outputs non-array value in the form of hash
|
199
|
+
# For object, use to_hash. Otherwise, just return the value
|
200
|
+
# @param [Object] value Any valid value
|
201
|
+
# @return [Hash] Returns the value in the form of hash
|
202
|
+
def _to_hash(value)
|
203
|
+
if value.is_a?(Array)
|
204
|
+
value.compact.map{ |v| _to_hash(v) }
|
205
|
+
elsif value.is_a?(Hash)
|
206
|
+
{}.tap do |hash|
|
207
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
208
|
+
end
|
209
|
+
elsif value.respond_to? :to_hash
|
210
|
+
value.to_hash
|
211
|
+
else
|
212
|
+
value
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|