xero-ruby 3.9.0 → 7.0.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 +4 -4
- data/README.md +2 -2
- data/lib/xero-ruby/api/accounting_api.rb +1136 -46
- data/lib/xero-ruby/api/app_store_api.rb +244 -0
- data/lib/xero-ruby/api/asset_api.rb +16 -6
- data/lib/xero-ruby/api/files_api.rb +156 -20
- data/lib/xero-ruby/api/payroll_au_api.rb +326 -30
- data/lib/xero-ruby/api/payroll_nz_api.rb +87 -0
- data/lib/xero-ruby/api/payroll_uk_api.rb +81 -0
- data/lib/xero-ruby/api/project_api.rb +286 -2
- data/lib/xero-ruby/api_client.rb +9 -3
- data/lib/xero-ruby/models/accounting/account.rb +1 -1
- data/lib/xero-ruby/models/accounting/account_type.rb +0 -4
- data/lib/xero-ruby/models/accounting/allocation.rb +21 -1
- data/lib/xero-ruby/models/accounting/batch_payment.rb +2 -2
- data/lib/xero-ruby/models/accounting/batch_payment_delete.rb +244 -0
- data/lib/xero-ruby/models/accounting/batch_payment_delete_by_url_param.rb +229 -0
- data/lib/xero-ruby/models/accounting/contact.rb +1 -11
- data/lib/xero-ruby/models/accounting/currency_code.rb +10 -8
- data/lib/xero-ruby/models/accounting/journal_line.rb +1 -1
- data/lib/xero-ruby/models/accounting/line_item.rb +2 -2
- data/lib/xero-ruby/models/accounting/organisation.rb +6 -2
- data/lib/xero-ruby/models/accounting/payment.rb +26 -4
- data/lib/xero-ruby/models/accounting/repeating_invoice.rb +53 -5
- data/lib/xero-ruby/models/accounting/tax_rate.rb +23 -5
- data/lib/xero-ruby/models/accounting/tax_type.rb +60 -3
- data/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb +75 -4
- data/lib/xero-ruby/models/accounting/time_zone.rb +123 -91
- data/lib/xero-ruby/models/app_store/create_usage_record.rb +243 -0
- data/lib/xero-ruby/models/app_store/update_usage_record.rb +228 -0
- data/lib/xero-ruby/models/app_store/usage_record.rb +332 -0
- data/lib/xero-ruby/models/app_store/usage_records_list.rb +230 -0
- data/lib/xero-ruby/models/files/association.rb +31 -1
- data/lib/xero-ruby/models/finance/problem_type.rb +1 -0
- data/lib/xero-ruby/models/finance/statement_line_response.rb +11 -1
- data/lib/xero-ruby/models/finance/statement_response.rb +24 -4
- data/lib/xero-ruby/models/payroll_au/allowance_type.rb +0 -1
- data/lib/xero-ruby/models/payroll_au/country_of_residence.rb +284 -0
- data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +21 -1
- data/lib/xero-ruby/models/payroll_au/earnings_type.rb +2 -0
- data/lib/xero-ruby/models/payroll_au/employee.rb +42 -2
- data/lib/xero-ruby/models/payroll_au/employment_basis.rb +1 -0
- data/lib/xero-ruby/models/payroll_au/employment_type.rb +36 -0
- data/lib/xero-ruby/models/payroll_au/income_type.rb +39 -0
- data/lib/xero-ruby/models/payroll_au/leave_application.rb +11 -1
- data/lib/xero-ruby/models/payroll_au/leave_category_code.rb +46 -0
- data/lib/xero-ruby/models/payroll_au/leave_earnings_line.rb +14 -4
- data/lib/xero-ruby/models/payroll_au/leave_line_calculation_type.rb +0 -1
- data/lib/xero-ruby/models/payroll_au/leave_period_status.rb +2 -0
- data/lib/xero-ruby/models/payroll_au/leave_type.rb +24 -4
- data/lib/xero-ruby/models/payroll_au/opening_balances.rb +16 -4
- data/lib/xero-ruby/models/payroll_au/paid_leave_earnings_line.rb +272 -0
- data/lib/xero-ruby/models/payroll_au/pay_out_type.rb +36 -0
- data/lib/xero-ruby/models/payroll_au/senior_marital_status.rb +37 -0
- data/lib/xero-ruby/models/payroll_au/settings.rb +14 -4
- data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +51 -1
- data/lib/xero-ruby/models/payroll_au/tax_scale_type.rb +40 -0
- data/lib/xero-ruby/models/payroll_au/work_condition.rb +37 -0
- data/lib/xero-ruby/models/payroll_nz/employee.rb +14 -4
- data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +3 -3
- data/lib/xero-ruby/models/projects/currency_code.rb +0 -1
- data/lib/xero-ruby/models/projects/task.rb +6 -6
- data/lib/xero-ruby/models/projects/task_create_or_update.rb +1 -1
- data/lib/xero-ruby/version.rb +2 -2
- data/lib/xero-ruby/where.rb +2 -0
- data/lib/xero-ruby.rb +15 -0
- metadata +30 -15
@@ -35,6 +35,9 @@ module XeroRuby::Accounting
|
|
35
35
|
attr_accessor :credit_note_number
|
36
36
|
|
37
37
|
|
38
|
+
attr_accessor :batch_payment
|
39
|
+
|
40
|
+
|
38
41
|
attr_accessor :account
|
39
42
|
|
40
43
|
# Code of account you are using to make the payment e.g. 001 (note- not all accounts have a code value)
|
@@ -104,6 +107,9 @@ module XeroRuby::Accounting
|
|
104
107
|
# Displays array of validation error messages from the API
|
105
108
|
attr_accessor :validation_errors
|
106
109
|
|
110
|
+
# Displays array of warning messages from the API
|
111
|
+
attr_accessor :warnings
|
112
|
+
|
107
113
|
class EnumAttributeValidator
|
108
114
|
attr_reader :datatype
|
109
115
|
attr_reader :allowable_values
|
@@ -135,6 +141,7 @@ module XeroRuby::Accounting
|
|
135
141
|
:'overpayment' => :'Overpayment',
|
136
142
|
:'invoice_number' => :'InvoiceNumber',
|
137
143
|
:'credit_note_number' => :'CreditNoteNumber',
|
144
|
+
:'batch_payment' => :'BatchPayment',
|
138
145
|
:'account' => :'Account',
|
139
146
|
:'code' => :'Code',
|
140
147
|
:'date' => :'Date',
|
@@ -154,7 +161,8 @@ module XeroRuby::Accounting
|
|
154
161
|
:'has_account' => :'HasAccount',
|
155
162
|
:'has_validation_errors' => :'HasValidationErrors',
|
156
163
|
:'status_attribute_string' => :'StatusAttributeString',
|
157
|
-
:'validation_errors' => :'ValidationErrors'
|
164
|
+
:'validation_errors' => :'ValidationErrors',
|
165
|
+
:'warnings' => :'Warnings'
|
158
166
|
}
|
159
167
|
end
|
160
168
|
|
@@ -167,6 +175,7 @@ module XeroRuby::Accounting
|
|
167
175
|
:'overpayment' => :'Overpayment',
|
168
176
|
:'invoice_number' => :'String',
|
169
177
|
:'credit_note_number' => :'String',
|
178
|
+
:'batch_payment' => :'BatchPayment',
|
170
179
|
:'account' => :'Account',
|
171
180
|
:'code' => :'String',
|
172
181
|
:'date' => :'Date',
|
@@ -186,7 +195,8 @@ module XeroRuby::Accounting
|
|
186
195
|
:'has_account' => :'Boolean',
|
187
196
|
:'has_validation_errors' => :'Boolean',
|
188
197
|
:'status_attribute_string' => :'String',
|
189
|
-
:'validation_errors' => :'Array<ValidationError>'
|
198
|
+
:'validation_errors' => :'Array<ValidationError>',
|
199
|
+
:'warnings' => :'Array<ValidationError>'
|
190
200
|
}
|
191
201
|
end
|
192
202
|
|
@@ -229,6 +239,10 @@ module XeroRuby::Accounting
|
|
229
239
|
self.credit_note_number = attributes[:'credit_note_number']
|
230
240
|
end
|
231
241
|
|
242
|
+
if attributes.key?(:'batch_payment')
|
243
|
+
self.batch_payment = attributes[:'batch_payment']
|
244
|
+
end
|
245
|
+
|
232
246
|
if attributes.key?(:'account')
|
233
247
|
self.account = attributes[:'account']
|
234
248
|
end
|
@@ -314,6 +328,12 @@ module XeroRuby::Accounting
|
|
314
328
|
self.validation_errors = value
|
315
329
|
end
|
316
330
|
end
|
331
|
+
|
332
|
+
if attributes.key?(:'warnings')
|
333
|
+
if (value = attributes[:'warnings']).is_a?(Array)
|
334
|
+
self.warnings = value
|
335
|
+
end
|
336
|
+
end
|
317
337
|
end
|
318
338
|
|
319
339
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -364,6 +384,7 @@ module XeroRuby::Accounting
|
|
364
384
|
overpayment == o.overpayment &&
|
365
385
|
invoice_number == o.invoice_number &&
|
366
386
|
credit_note_number == o.credit_note_number &&
|
387
|
+
batch_payment == o.batch_payment &&
|
367
388
|
account == o.account &&
|
368
389
|
code == o.code &&
|
369
390
|
date == o.date &&
|
@@ -383,7 +404,8 @@ module XeroRuby::Accounting
|
|
383
404
|
has_account == o.has_account &&
|
384
405
|
has_validation_errors == o.has_validation_errors &&
|
385
406
|
status_attribute_string == o.status_attribute_string &&
|
386
|
-
validation_errors == o.validation_errors
|
407
|
+
validation_errors == o.validation_errors &&
|
408
|
+
warnings == o.warnings
|
387
409
|
end
|
388
410
|
|
389
411
|
# @see the `==` method
|
@@ -395,7 +417,7 @@ module XeroRuby::Accounting
|
|
395
417
|
# Calculates hash code according to all attributes.
|
396
418
|
# @return [Integer] Hash code
|
397
419
|
def hash
|
398
|
-
[invoice, credit_note, prepayment, overpayment, invoice_number, credit_note_number, account, code, date, currency_rate, amount, bank_amount, reference, is_reconciled, status, payment_type, updated_date_utc, payment_id, batch_payment_id, bank_account_number, particulars, details, has_account, has_validation_errors, status_attribute_string, validation_errors].hash
|
420
|
+
[invoice, credit_note, prepayment, overpayment, invoice_number, credit_note_number, batch_payment, account, code, date, currency_rate, amount, bank_amount, reference, is_reconciled, status, payment_type, updated_date_utc, payment_id, batch_payment_id, bank_account_number, particulars, details, has_account, has_validation_errors, status_attribute_string, validation_errors, warnings].hash
|
399
421
|
end
|
400
422
|
|
401
423
|
# Builds the object from hash
|
@@ -63,12 +63,24 @@ module XeroRuby::Accounting
|
|
63
63
|
# Xero generated unique identifier for repeating invoice template
|
64
64
|
attr_accessor :id
|
65
65
|
|
66
|
-
#
|
66
|
+
# Boolean to indicate if an invoice has an attachment
|
67
67
|
attr_accessor :has_attachments
|
68
68
|
|
69
69
|
# Displays array of attachments from the API
|
70
70
|
attr_accessor :attachments
|
71
71
|
|
72
|
+
# Boolean to indicate whether the invoice has been approved for sending
|
73
|
+
attr_accessor :approved_for_sending
|
74
|
+
|
75
|
+
# Boolean to indicate whether a copy is sent to sender's email
|
76
|
+
attr_accessor :send_copy
|
77
|
+
|
78
|
+
# Boolean to indicate whether the invoice in the Xero app displays as \"sent\"
|
79
|
+
attr_accessor :mark_as_sent
|
80
|
+
|
81
|
+
# Boolean to indicate whether to include PDF attachment
|
82
|
+
attr_accessor :include_pdf
|
83
|
+
|
72
84
|
class EnumAttributeValidator
|
73
85
|
attr_reader :datatype
|
74
86
|
attr_reader :allowable_values
|
@@ -109,7 +121,11 @@ module XeroRuby::Accounting
|
|
109
121
|
:'repeating_invoice_id' => :'RepeatingInvoiceID',
|
110
122
|
:'id' => :'ID',
|
111
123
|
:'has_attachments' => :'HasAttachments',
|
112
|
-
:'attachments' => :'Attachments'
|
124
|
+
:'attachments' => :'Attachments',
|
125
|
+
:'approved_for_sending' => :'ApprovedForSending',
|
126
|
+
:'send_copy' => :'SendCopy',
|
127
|
+
:'mark_as_sent' => :'MarkAsSent',
|
128
|
+
:'include_pdf' => :'IncludePDF'
|
113
129
|
}
|
114
130
|
end
|
115
131
|
|
@@ -131,7 +147,11 @@ module XeroRuby::Accounting
|
|
131
147
|
:'repeating_invoice_id' => :'String',
|
132
148
|
:'id' => :'String',
|
133
149
|
:'has_attachments' => :'Boolean',
|
134
|
-
:'attachments' => :'Array<Attachment>'
|
150
|
+
:'attachments' => :'Array<Attachment>',
|
151
|
+
:'approved_for_sending' => :'Boolean',
|
152
|
+
:'send_copy' => :'Boolean',
|
153
|
+
:'mark_as_sent' => :'Boolean',
|
154
|
+
:'include_pdf' => :'Boolean'
|
135
155
|
}
|
136
156
|
end
|
137
157
|
|
@@ -219,6 +239,30 @@ module XeroRuby::Accounting
|
|
219
239
|
self.attachments = value
|
220
240
|
end
|
221
241
|
end
|
242
|
+
|
243
|
+
if attributes.key?(:'approved_for_sending')
|
244
|
+
self.approved_for_sending = attributes[:'approved_for_sending']
|
245
|
+
else
|
246
|
+
self.approved_for_sending = false
|
247
|
+
end
|
248
|
+
|
249
|
+
if attributes.key?(:'send_copy')
|
250
|
+
self.send_copy = attributes[:'send_copy']
|
251
|
+
else
|
252
|
+
self.send_copy = false
|
253
|
+
end
|
254
|
+
|
255
|
+
if attributes.key?(:'mark_as_sent')
|
256
|
+
self.mark_as_sent = attributes[:'mark_as_sent']
|
257
|
+
else
|
258
|
+
self.mark_as_sent = false
|
259
|
+
end
|
260
|
+
|
261
|
+
if attributes.key?(:'include_pdf')
|
262
|
+
self.include_pdf = attributes[:'include_pdf']
|
263
|
+
else
|
264
|
+
self.include_pdf = false
|
265
|
+
end
|
222
266
|
end
|
223
267
|
|
224
268
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -278,7 +322,11 @@ module XeroRuby::Accounting
|
|
278
322
|
repeating_invoice_id == o.repeating_invoice_id &&
|
279
323
|
id == o.id &&
|
280
324
|
has_attachments == o.has_attachments &&
|
281
|
-
attachments == o.attachments
|
325
|
+
attachments == o.attachments &&
|
326
|
+
approved_for_sending == o.approved_for_sending &&
|
327
|
+
send_copy == o.send_copy &&
|
328
|
+
mark_as_sent == o.mark_as_sent &&
|
329
|
+
include_pdf == o.include_pdf
|
282
330
|
end
|
283
331
|
|
284
332
|
# @see the `==` method
|
@@ -290,7 +338,7 @@ module XeroRuby::Accounting
|
|
290
338
|
# Calculates hash code according to all attributes.
|
291
339
|
# @return [Integer] Hash code
|
292
340
|
def hash
|
293
|
-
[type, contact, schedule, line_items, line_amount_types, reference, branding_theme_id, currency_code, status, sub_total, total_tax, total, repeating_invoice_id, id, has_attachments, attachments].hash
|
341
|
+
[type, contact, schedule, line_items, line_amount_types, reference, branding_theme_id, currency_code, status, sub_total, total_tax, total, repeating_invoice_id, id, has_attachments, attachments, approved_for_sending, send_copy, mark_as_sent, include_pdf].hash
|
294
342
|
end
|
295
343
|
|
296
344
|
# Builds the object from hash
|
@@ -112,9 +112,27 @@ module XeroRuby::Accounting
|
|
112
112
|
IGDSINPUT3 ||= "IGDSINPUT3".freeze
|
113
113
|
SROVR ||= "SROVR".freeze
|
114
114
|
TOURISTREFUND ||= "TOURISTREFUND".freeze
|
115
|
-
|
116
|
-
|
117
|
-
|
115
|
+
TXRCN33 ||= "TXRCN33".freeze
|
116
|
+
TXRCRE ||= "TXRCRE".freeze
|
117
|
+
TXRCESS ||= "TXRCESS".freeze
|
118
|
+
TXRCTS ||= "TXRCTS".freeze
|
119
|
+
CAPEXINPUT ||= "CAPEXINPUT".freeze
|
120
|
+
UNDEFINED ||= "UNDEFINED".freeze
|
121
|
+
CAPEXOUTPUT ||= "CAPEXOUTPUT".freeze
|
122
|
+
ZEROEXPOUTPUT ||= "ZEROEXPOUTPUT".freeze
|
123
|
+
GOODSIMPORT ||= "GOODSIMPORT".freeze
|
124
|
+
NONEINPUT ||= "NONEINPUT".freeze
|
125
|
+
NOTREPORTED ||= "NOTREPORTED".freeze
|
126
|
+
SROVRRS ||= "SROVRRS".freeze
|
127
|
+
SROVRLVG ||= "SROVRLVG".freeze
|
128
|
+
SRLVG ||= "SRLVG".freeze
|
129
|
+
IM ||= "IM".freeze
|
130
|
+
IMESS ||= "IMESS".freeze
|
131
|
+
IMN33 ||= "IMN33".freeze
|
132
|
+
IMRE ||= "IMRE".freeze
|
133
|
+
BADDEBTRECOVERY ||= "BADDEBTRECOVERY".freeze
|
134
|
+
USSALESTAX ||= "USSALESTAX".freeze
|
135
|
+
BLINPUT3 ||= "BLINPUT3".freeze
|
118
136
|
|
119
137
|
# Boolean to describe if tax rate can be used for asset accounts i.e. true,false
|
120
138
|
attr_accessor :can_apply_to_assets
|
@@ -273,7 +291,7 @@ module XeroRuby::Accounting
|
|
273
291
|
def valid?
|
274
292
|
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "DELETED", "ARCHIVED", "PENDING"])
|
275
293
|
return false unless status_validator.valid?(@status)
|
276
|
-
report_tax_type_validator = EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "
|
294
|
+
report_tax_type_validator = EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33", "TXRCRE", "TXRCESS", "TXRCTS", "CAPEXINPUT", "UNDEFINED", "CAPEXOUTPUT", "ZEROEXPOUTPUT", "GOODSIMPORT", "NONEINPUT", "NOTREPORTED", "SROVRRS", "SROVRLVG", "SRLVG", "IM", "IMESS", "IMN33", "IMRE", "BADDEBTRECOVERY", "USSALESTAX", "BLINPUT3"])
|
277
295
|
return false unless report_tax_type_validator.valid?(@report_tax_type)
|
278
296
|
true
|
279
297
|
end
|
@@ -291,7 +309,7 @@ module XeroRuby::Accounting
|
|
291
309
|
# Custom attribute writer method checking allowed values (enum).
|
292
310
|
# @param [Object] report_tax_type Object to be assigned
|
293
311
|
def report_tax_type=(report_tax_type)
|
294
|
-
validator = EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "
|
312
|
+
validator = EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33", "TXRCRE", "TXRCESS", "TXRCTS", "CAPEXINPUT", "UNDEFINED", "CAPEXOUTPUT", "ZEROEXPOUTPUT", "GOODSIMPORT", "NONEINPUT", "NOTREPORTED", "SROVRRS", "SROVRLVG", "SRLVG", "IM", "IMESS", "IMN33", "IMRE", "BADDEBTRECOVERY", "USSALESTAX", "BLINPUT3"])
|
295
313
|
unless validator.valid?(report_tax_type)
|
296
314
|
fail ArgumentError, "invalid value for \"report_tax_type\", must be one of #{validator.allowable_values}."
|
297
315
|
end
|
@@ -77,9 +77,66 @@ module XeroRuby::Accounting
|
|
77
77
|
IGDSINPUT3 ||= "IGDSINPUT3".freeze
|
78
78
|
SROVR ||= "SROVR".freeze
|
79
79
|
TOURISTREFUND ||= "TOURISTREFUND".freeze
|
80
|
-
|
81
|
-
|
82
|
-
|
80
|
+
TXRCN33 ||= "TXRCN33".freeze
|
81
|
+
TXRCRE ||= "TXRCRE".freeze
|
82
|
+
TXRCESS ||= "TXRCESS".freeze
|
83
|
+
TXRCTS ||= "TXRCTS".freeze
|
84
|
+
OUTPUTY23 ||= "OUTPUTY23".freeze
|
85
|
+
DSOUTPUTY23 ||= "DSOUTPUTY23".freeze
|
86
|
+
INPUTY23 ||= "INPUTY23".freeze
|
87
|
+
IMINPUT2_Y23 ||= "IMINPUT2Y23".freeze
|
88
|
+
IGDSINPUT2_Y23 ||= "IGDSINPUT2Y23".freeze
|
89
|
+
TXPETINPUTY23 ||= "TXPETINPUTY23".freeze
|
90
|
+
TXESSINPUTY23 ||= "TXESSINPUTY23".freeze
|
91
|
+
TXN33_INPUTY23 ||= "TXN33INPUTY23".freeze
|
92
|
+
TXREINPUTY23 ||= "TXREINPUTY23".freeze
|
93
|
+
TXCAY23 ||= "TXCAY23".freeze
|
94
|
+
BADDEBTRELIEFY23 ||= "BADDEBTRELIEFY23".freeze
|
95
|
+
IGDSINPUT3_Y23 ||= "IGDSINPUT3Y23".freeze
|
96
|
+
SROVRRSY23 ||= "SROVRRSY23".freeze
|
97
|
+
SROVRLVGY23 ||= "SROVRLVGY23".freeze
|
98
|
+
SRLVGY23 ||= "SRLVGY23".freeze
|
99
|
+
TXRCN33_Y23 ||= "TXRCN33Y23".freeze
|
100
|
+
TXRCREY23 ||= "TXRCREY23".freeze
|
101
|
+
TXRCESSY23 ||= "TXRCESSY23".freeze
|
102
|
+
TXRCTSY23 ||= "TXRCTSY23".freeze
|
103
|
+
IM ||= "IM".freeze
|
104
|
+
IMY23 ||= "IMY23".freeze
|
105
|
+
IMESS ||= "IMESS".freeze
|
106
|
+
IMESSY23 ||= "IMESSY23".freeze
|
107
|
+
IMN33 ||= "IMN33".freeze
|
108
|
+
IMN33_Y23 ||= "IMN33Y23".freeze
|
109
|
+
IMRE ||= "IMRE".freeze
|
110
|
+
IMREY23 ||= "IMREY23".freeze
|
111
|
+
BADDEBTRECOVERY ||= "BADDEBTRECOVERY".freeze
|
112
|
+
BADDEBTRECOVERYY23 ||= "BADDEBTRECOVERYY23".freeze
|
113
|
+
OUTPUTY24 ||= "OUTPUTY24".freeze
|
114
|
+
DSOUTPUTY24 ||= "DSOUTPUTY24".freeze
|
115
|
+
INPUTY24 ||= "INPUTY24".freeze
|
116
|
+
IGDSINPUT2_Y24 ||= "IGDSINPUT2Y24".freeze
|
117
|
+
TXPETINPUTY24 ||= "TXPETINPUTY24".freeze
|
118
|
+
TXESSINPUTY24 ||= "TXESSINPUTY24".freeze
|
119
|
+
TXN33_INPUTY24 ||= "TXN33INPUTY24".freeze
|
120
|
+
TXREINPUTY24 ||= "TXREINPUTY24".freeze
|
121
|
+
TXCAY24 ||= "TXCAY24".freeze
|
122
|
+
BADDEBTRELIEFY24 ||= "BADDEBTRELIEFY24".freeze
|
123
|
+
IGDSINPUT3_Y24 ||= "IGDSINPUT3Y24".freeze
|
124
|
+
SROVRRSY24 ||= "SROVRRSY24".freeze
|
125
|
+
SROVRLVGY24 ||= "SROVRLVGY24".freeze
|
126
|
+
SRLVGY24 ||= "SRLVGY24".freeze
|
127
|
+
TXRCTSY24 ||= "TXRCTSY24".freeze
|
128
|
+
TXRCESSY24 ||= "TXRCESSY24".freeze
|
129
|
+
TXRCN33_Y24 ||= "TXRCN33Y24".freeze
|
130
|
+
TXRCREY24 ||= "TXRCREY24".freeze
|
131
|
+
IMY24 ||= "IMY24".freeze
|
132
|
+
IMESSY24 ||= "IMESSY24".freeze
|
133
|
+
IMN33_Y24 ||= "IMN33Y24".freeze
|
134
|
+
IMREY24 ||= "IMREY24".freeze
|
135
|
+
BADDEBTRECOVERYY24 ||= "BADDEBTRECOVERYY24".freeze
|
136
|
+
OSOUTPUT2 ||= "OSOUTPUT2".freeze
|
137
|
+
BLINPUT3 ||= "BLINPUT3".freeze
|
138
|
+
BLINPUT3_Y23 ||= "BLINPUT3Y23".freeze
|
139
|
+
BLINPUT3_Y24 ||= "BLINPUT3Y24".freeze
|
83
140
|
|
84
141
|
# Builds the enum from string
|
85
142
|
# @param [String] The enum value in the form of the string
|
@@ -82,6 +82,44 @@ module XeroRuby::Accounting
|
|
82
82
|
# Contact contact id
|
83
83
|
attr_accessor :contact_id
|
84
84
|
|
85
|
+
# Contact legal name
|
86
|
+
attr_accessor :legal_name
|
87
|
+
|
88
|
+
# Contact business name
|
89
|
+
attr_accessor :business_name
|
90
|
+
|
91
|
+
# Contact federal tax classification
|
92
|
+
attr_accessor :federal_tax_classification
|
93
|
+
SOLE_PROPRIETOR ||= "SOLE_PROPRIETOR".freeze
|
94
|
+
PARTNERSHIP ||= "PARTNERSHIP".freeze
|
95
|
+
TRUST_OR_ESTATE ||= "TRUST_OR_ESTATE".freeze
|
96
|
+
NONPROFIT ||= "NONPROFIT".freeze
|
97
|
+
C_CORP ||= "C_CORP".freeze
|
98
|
+
S_CORP ||= "S_CORP".freeze
|
99
|
+
OTHER ||= "OTHER".freeze
|
100
|
+
|
101
|
+
class EnumAttributeValidator
|
102
|
+
attr_reader :datatype
|
103
|
+
attr_reader :allowable_values
|
104
|
+
|
105
|
+
def initialize(datatype, allowable_values)
|
106
|
+
@allowable_values = allowable_values.map do |value|
|
107
|
+
case datatype.to_s
|
108
|
+
when /Integer/i
|
109
|
+
value.to_i
|
110
|
+
when /Float/i
|
111
|
+
value.to_f
|
112
|
+
else
|
113
|
+
value
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
def valid?(value)
|
119
|
+
!value || allowable_values.include?(value)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
85
123
|
# Attribute mapping from ruby-style variable name to JSON key.
|
86
124
|
def self.attribute_map
|
87
125
|
{
|
@@ -106,7 +144,10 @@ module XeroRuby::Accounting
|
|
106
144
|
:'email' => :'Email',
|
107
145
|
:'street_address' => :'StreetAddress',
|
108
146
|
:'tax_id' => :'TaxID',
|
109
|
-
:'contact_id' => :'ContactId'
|
147
|
+
:'contact_id' => :'ContactId',
|
148
|
+
:'legal_name' => :'LegalName',
|
149
|
+
:'business_name' => :'BusinessName',
|
150
|
+
:'federal_tax_classification' => :'FederalTaxClassification'
|
110
151
|
}
|
111
152
|
end
|
112
153
|
|
@@ -134,7 +175,10 @@ module XeroRuby::Accounting
|
|
134
175
|
:'email' => :'String',
|
135
176
|
:'street_address' => :'String',
|
136
177
|
:'tax_id' => :'String',
|
137
|
-
:'contact_id' => :'String'
|
178
|
+
:'contact_id' => :'String',
|
179
|
+
:'legal_name' => :'String',
|
180
|
+
:'business_name' => :'String',
|
181
|
+
:'federal_tax_classification' => :'String'
|
138
182
|
}
|
139
183
|
end
|
140
184
|
|
@@ -240,6 +284,18 @@ module XeroRuby::Accounting
|
|
240
284
|
if attributes.key?(:'contact_id')
|
241
285
|
self.contact_id = attributes[:'contact_id']
|
242
286
|
end
|
287
|
+
|
288
|
+
if attributes.key?(:'legal_name')
|
289
|
+
self.legal_name = attributes[:'legal_name']
|
290
|
+
end
|
291
|
+
|
292
|
+
if attributes.key?(:'business_name')
|
293
|
+
self.business_name = attributes[:'business_name']
|
294
|
+
end
|
295
|
+
|
296
|
+
if attributes.key?(:'federal_tax_classification')
|
297
|
+
self.federal_tax_classification = attributes[:'federal_tax_classification']
|
298
|
+
end
|
243
299
|
end
|
244
300
|
|
245
301
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -252,9 +308,21 @@ module XeroRuby::Accounting
|
|
252
308
|
# Check to see if the all the properties in the model are valid
|
253
309
|
# @return true if the model is valid
|
254
310
|
def valid?
|
311
|
+
federal_tax_classification_validator = EnumAttributeValidator.new('String', ["SOLE_PROPRIETOR", "PARTNERSHIP", "TRUST_OR_ESTATE", "NONPROFIT", "C_CORP", "S_CORP", "OTHER"])
|
312
|
+
return false unless federal_tax_classification_validator.valid?(@federal_tax_classification)
|
255
313
|
true
|
256
314
|
end
|
257
315
|
|
316
|
+
# Custom attribute writer method checking allowed values (enum).
|
317
|
+
# @param [Object] federal_tax_classification Object to be assigned
|
318
|
+
def federal_tax_classification=(federal_tax_classification)
|
319
|
+
validator = EnumAttributeValidator.new('String', ["SOLE_PROPRIETOR", "PARTNERSHIP", "TRUST_OR_ESTATE", "NONPROFIT", "C_CORP", "S_CORP", "OTHER"])
|
320
|
+
unless validator.valid?(federal_tax_classification)
|
321
|
+
fail ArgumentError, "invalid value for \"federal_tax_classification\", must be one of #{validator.allowable_values}."
|
322
|
+
end
|
323
|
+
@federal_tax_classification = federal_tax_classification
|
324
|
+
end
|
325
|
+
|
258
326
|
# Checks equality by comparing each attribute.
|
259
327
|
# @param [Object] Object to be compared
|
260
328
|
def ==(o)
|
@@ -281,7 +349,10 @@ module XeroRuby::Accounting
|
|
281
349
|
email == o.email &&
|
282
350
|
street_address == o.street_address &&
|
283
351
|
tax_id == o.tax_id &&
|
284
|
-
contact_id == o.contact_id
|
352
|
+
contact_id == o.contact_id &&
|
353
|
+
legal_name == o.legal_name &&
|
354
|
+
business_name == o.business_name &&
|
355
|
+
federal_tax_classification == o.federal_tax_classification
|
285
356
|
end
|
286
357
|
|
287
358
|
# @see the `==` method
|
@@ -293,7 +364,7 @@ module XeroRuby::Accounting
|
|
293
364
|
# Calculates hash code according to all attributes.
|
294
365
|
# @return [Integer] Hash code
|
295
366
|
def hash
|
296
|
-
[box1, box2, box3, box4, box5, box6, box7, box8, box9, box10, box11, box13, box14, name, federal_tax_id_type, city, zip, state, email, street_address, tax_id, contact_id].hash
|
367
|
+
[box1, box2, box3, box4, box5, box6, box7, box8, box9, box10, box11, box13, box14, name, federal_tax_id_type, city, zip, state, email, street_address, tax_id, contact_id, legal_name, business_name, federal_tax_classification].hash
|
297
368
|
end
|
298
369
|
|
299
370
|
# Builds the object from hash
|