xero-ruby 16.0.0 → 18.2.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/lib/xero-ruby/api/accounting_api.rb +189 -2
- data/lib/xero-ruby/models/accounting/bank_transfer.rb +71 -1
- data/lib/xero-ruby/models/accounting/bank_transfer_delete.rb +244 -0
- data/lib/xero-ruby/models/accounting/bank_transfer_delete_by_url_param.rb +229 -0
- data/lib/xero-ruby/models/accounting/bank_transfers_delete.rb +224 -0
- data/lib/xero-ruby/models/accounting/credit_note.rb +11 -1
- data/lib/xero-ruby/models/accounting/invoice.rb +35 -5
- data/lib/xero-ruby/models/accounting/item.rb +22 -2
- data/lib/xero-ruby/models/accounting/organisation.rb +3 -2
- data/lib/xero-ruby/models/accounting/overpayment.rb +11 -1
- data/lib/xero-ruby/models/accounting/payment.rb +11 -1
- data/lib/xero-ruby/models/accounting/prepayment.rb +11 -1
- data/lib/xero-ruby/models/accounting/tracking_reference.rb +277 -0
- data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +6 -1
- data/lib/xero-ruby/models/payroll_au/leave_line.rb +6 -1
- data/lib/xero-ruby/models/payroll_au/leave_type.rb +6 -1
- data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +1 -1
- data/lib/xero-ruby/models/payroll_uk/employment_status.rb +1 -0
- data/lib/xero-ruby/version.rb +2 -2
- data/lib/xero-ruby.rb +4 -0
- metadata +378 -374
|
@@ -63,6 +63,9 @@ module XeroRuby::Accounting
|
|
|
63
63
|
# UTC timestamp of last update to the credit note
|
|
64
64
|
attr_accessor :updated_date_utc
|
|
65
65
|
|
|
66
|
+
# UTC ISO-8601 formatted timestamp of last update to the credit note
|
|
67
|
+
attr_accessor :updated_date_utc_string
|
|
68
|
+
|
|
66
69
|
|
|
67
70
|
attr_accessor :currency_code
|
|
68
71
|
|
|
@@ -155,6 +158,7 @@ module XeroRuby::Accounting
|
|
|
155
158
|
:'cis_deduction' => :'CISDeduction',
|
|
156
159
|
:'cis_rate' => :'CISRate',
|
|
157
160
|
:'updated_date_utc' => :'UpdatedDateUTC',
|
|
161
|
+
:'updated_date_utc_string' => :'UpdatedDateUTCString',
|
|
158
162
|
:'currency_code' => :'CurrencyCode',
|
|
159
163
|
:'fully_paid_on_date' => :'FullyPaidOnDate',
|
|
160
164
|
:'credit_note_id' => :'CreditNoteID',
|
|
@@ -192,6 +196,7 @@ module XeroRuby::Accounting
|
|
|
192
196
|
:'cis_deduction' => :'BigDecimal',
|
|
193
197
|
:'cis_rate' => :'BigDecimal',
|
|
194
198
|
:'updated_date_utc' => :'DateTime',
|
|
199
|
+
:'updated_date_utc_string' => :'String',
|
|
195
200
|
:'currency_code' => :'CurrencyCode',
|
|
196
201
|
:'fully_paid_on_date' => :'Date',
|
|
197
202
|
:'credit_note_id' => :'String',
|
|
@@ -282,6 +287,10 @@ module XeroRuby::Accounting
|
|
|
282
287
|
self.updated_date_utc = attributes[:'updated_date_utc']
|
|
283
288
|
end
|
|
284
289
|
|
|
290
|
+
if attributes.key?(:'updated_date_utc_string')
|
|
291
|
+
self.updated_date_utc_string = attributes[:'updated_date_utc_string']
|
|
292
|
+
end
|
|
293
|
+
|
|
285
294
|
if attributes.key?(:'currency_code')
|
|
286
295
|
self.currency_code = attributes[:'currency_code']
|
|
287
296
|
end
|
|
@@ -424,6 +433,7 @@ module XeroRuby::Accounting
|
|
|
424
433
|
cis_deduction == o.cis_deduction &&
|
|
425
434
|
cis_rate == o.cis_rate &&
|
|
426
435
|
updated_date_utc == o.updated_date_utc &&
|
|
436
|
+
updated_date_utc_string == o.updated_date_utc_string &&
|
|
427
437
|
currency_code == o.currency_code &&
|
|
428
438
|
fully_paid_on_date == o.fully_paid_on_date &&
|
|
429
439
|
credit_note_id == o.credit_note_id &&
|
|
@@ -453,7 +463,7 @@ module XeroRuby::Accounting
|
|
|
453
463
|
# Calculates hash code according to all attributes.
|
|
454
464
|
# @return [Integer] Hash code
|
|
455
465
|
def hash
|
|
456
|
-
[type, contact, date, due_date, status, line_amount_types, line_items, sub_total, total_tax, total, cis_deduction, cis_rate, updated_date_utc, currency_code, fully_paid_on_date, credit_note_id, credit_note_number, reference, sent_to_contact, currency_rate, remaining_credit, allocations, applied_amount, payments, branding_theme_id, status_attribute_string, has_attachments, has_errors, validation_errors, warnings, invoice_addresses].hash
|
|
466
|
+
[type, contact, date, due_date, status, line_amount_types, line_items, sub_total, total_tax, total, cis_deduction, cis_rate, updated_date_utc, updated_date_utc_string, currency_code, fully_paid_on_date, credit_note_id, credit_note_number, reference, sent_to_contact, currency_rate, remaining_credit, allocations, applied_amount, payments, branding_theme_id, status_attribute_string, has_attachments, has_errors, validation_errors, warnings, invoice_addresses].hash
|
|
457
467
|
end
|
|
458
468
|
|
|
459
469
|
# Builds the object from hash
|
|
@@ -84,18 +84,24 @@ module XeroRuby::Accounting
|
|
|
84
84
|
# CIS Deduction rate for the organisation
|
|
85
85
|
attr_accessor :cis_rate
|
|
86
86
|
|
|
87
|
-
# Total of invoice excluding taxes
|
|
87
|
+
# Total of invoice excluding taxes. Calculated automatically by Xero from the invoice's line items. Only for ACCPAY and ACCREC invoices, where this opt-in capability is enabled for your organisation, can SubTotal be supplied on write – on a SUBMITTED or AUTHORISED invoice supplied together with TotalTax and Total, it is validated against the calculated line item totals (see RoundingAmount); it is ignored in all other cases. This write behaviour, and the returned value reflecting it, only applies to the Create and Update endpoints (POST/PUT) and to retrieving a single invoice by ID (GET by ID) – it does not apply when listing invoices (GET)
|
|
88
88
|
attr_accessor :sub_total
|
|
89
89
|
|
|
90
|
-
# Total tax on invoice
|
|
90
|
+
# Total tax on invoice. Calculated automatically by Xero from the invoice's line items. Only for ACCPAY and ACCREC invoices, where this opt-in capability is enabled for your organisation, can TotalTax be supplied on write – on a SUBMITTED or AUTHORISED invoice supplied together with SubTotal and Total, it is validated against the calculated line item totals (see RoundingAmount); it is ignored in all other cases. This write behaviour, and the returned value reflecting it, only applies to the Create and Update endpoints (POST/PUT) and to retrieving a single invoice by ID (GET by ID) – it does not apply when listing invoices (GET)
|
|
91
91
|
attr_accessor :total_tax
|
|
92
92
|
|
|
93
|
-
# Total of Invoice tax inclusive (i.e. SubTotal + TotalTax).
|
|
93
|
+
# Total of Invoice tax inclusive (i.e. SubTotal + TotalTax + RoundingAmount). Calculated automatically by Xero from the invoice's line items. Only for ACCPAY and ACCREC invoices, where this opt-in capability is enabled for your organisation, can Total be supplied on write – on a SUBMITTED or AUTHORISED invoice supplied together with SubTotal and TotalTax, it is validated against the calculated line item totals plus RoundingAmount; in all other cases this will be ignored if it does not equal the sum of the LineAmounts. This write behaviour, and the returned value reflecting it, only applies to the Create and Update endpoints (POST/PUT) and to retrieving a single invoice by ID (GET by ID) – it does not apply when listing invoices (GET)
|
|
94
94
|
attr_accessor :total
|
|
95
95
|
|
|
96
96
|
# Total of discounts applied on the invoice line items
|
|
97
97
|
attr_accessor :total_discount
|
|
98
98
|
|
|
99
|
+
# An optional rounding adjustment added to SubTotal + TotalTax to give Total (i.e. Total = SubTotal + TotalTax + RoundingAmount). Only applies to ACCPAY and ACCREC invoices, and only if this opt-in capability has been enabled for your organisation. Not validated while the invoice is DRAFT. For SUBMITTED and AUTHORISED invoices, RoundingAmount is only applied when SubTotal, TotalTax and Total are all supplied together, and must be between -0.10 and 0.10 – values outside this range are rejected with a validation error (on DRAFT invoices, an out-of-range value is ignored instead). This field is only settable and only returned via the Create and Update endpoints (POST/PUT) and when retrieving a single invoice by ID (GET by ID) – it is not returned when listing invoices (GET)
|
|
100
|
+
attr_accessor :rounding_amount
|
|
101
|
+
|
|
102
|
+
# The total amount as originally entered for the invoice, before any RoundingAmount adjustment is applied. Only applies to ACCPAY and ACCREC invoices, and only if this opt-in capability has been enabled for your organisation. Can only be set while the invoice is DRAFT; once the invoice is no longer DRAFT this reflects Total. This field is only settable and only returned via the Create and Update endpoints (POST/PUT) and when retrieving a single invoice by ID (GET by ID) – it is not returned when listing invoices (GET)
|
|
103
|
+
attr_accessor :entered_total
|
|
104
|
+
|
|
99
105
|
# Xero generated unique identifier for invoice
|
|
100
106
|
attr_accessor :invoice_id
|
|
101
107
|
|
|
@@ -129,9 +135,12 @@ module XeroRuby::Accounting
|
|
|
129
135
|
# Sum of all credit notes, over-payments and pre-payments applied to invoice
|
|
130
136
|
attr_accessor :amount_credited
|
|
131
137
|
|
|
132
|
-
#
|
|
138
|
+
# UTC timestamp of last update to the invoice
|
|
133
139
|
attr_accessor :updated_date_utc
|
|
134
140
|
|
|
141
|
+
# UTC ISO-8601 formatted timestamp of last update to the invoice
|
|
142
|
+
attr_accessor :updated_date_utc_string
|
|
143
|
+
|
|
135
144
|
# Details of credit notes that have been applied to an invoice
|
|
136
145
|
attr_accessor :credit_notes
|
|
137
146
|
|
|
@@ -200,6 +209,8 @@ module XeroRuby::Accounting
|
|
|
200
209
|
:'total_tax' => :'TotalTax',
|
|
201
210
|
:'total' => :'Total',
|
|
202
211
|
:'total_discount' => :'TotalDiscount',
|
|
212
|
+
:'rounding_amount' => :'RoundingAmount',
|
|
213
|
+
:'entered_total' => :'EnteredTotal',
|
|
203
214
|
:'invoice_id' => :'InvoiceID',
|
|
204
215
|
:'repeating_invoice_id' => :'RepeatingInvoiceID',
|
|
205
216
|
:'has_attachments' => :'HasAttachments',
|
|
@@ -212,6 +223,7 @@ module XeroRuby::Accounting
|
|
|
212
223
|
:'fully_paid_on_date' => :'FullyPaidOnDate',
|
|
213
224
|
:'amount_credited' => :'AmountCredited',
|
|
214
225
|
:'updated_date_utc' => :'UpdatedDateUTC',
|
|
226
|
+
:'updated_date_utc_string' => :'UpdatedDateUTCString',
|
|
215
227
|
:'credit_notes' => :'CreditNotes',
|
|
216
228
|
:'attachments' => :'Attachments',
|
|
217
229
|
:'has_errors' => :'HasErrors',
|
|
@@ -247,6 +259,8 @@ module XeroRuby::Accounting
|
|
|
247
259
|
:'total_tax' => :'BigDecimal',
|
|
248
260
|
:'total' => :'BigDecimal',
|
|
249
261
|
:'total_discount' => :'BigDecimal',
|
|
262
|
+
:'rounding_amount' => :'BigDecimal',
|
|
263
|
+
:'entered_total' => :'BigDecimal',
|
|
250
264
|
:'invoice_id' => :'String',
|
|
251
265
|
:'repeating_invoice_id' => :'String',
|
|
252
266
|
:'has_attachments' => :'Boolean',
|
|
@@ -259,6 +273,7 @@ module XeroRuby::Accounting
|
|
|
259
273
|
:'fully_paid_on_date' => :'Date',
|
|
260
274
|
:'amount_credited' => :'BigDecimal',
|
|
261
275
|
:'updated_date_utc' => :'DateTime',
|
|
276
|
+
:'updated_date_utc_string' => :'String',
|
|
262
277
|
:'credit_notes' => :'Array<CreditNote>',
|
|
263
278
|
:'attachments' => :'Array<Attachment>',
|
|
264
279
|
:'has_errors' => :'Boolean',
|
|
@@ -374,6 +389,14 @@ module XeroRuby::Accounting
|
|
|
374
389
|
self.total_discount = attributes[:'total_discount']
|
|
375
390
|
end
|
|
376
391
|
|
|
392
|
+
if attributes.key?(:'rounding_amount')
|
|
393
|
+
self.rounding_amount = attributes[:'rounding_amount']
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
if attributes.key?(:'entered_total')
|
|
397
|
+
self.entered_total = attributes[:'entered_total']
|
|
398
|
+
end
|
|
399
|
+
|
|
377
400
|
if attributes.key?(:'invoice_id')
|
|
378
401
|
self.invoice_id = attributes[:'invoice_id']
|
|
379
402
|
end
|
|
@@ -430,6 +453,10 @@ module XeroRuby::Accounting
|
|
|
430
453
|
self.updated_date_utc = attributes[:'updated_date_utc']
|
|
431
454
|
end
|
|
432
455
|
|
|
456
|
+
if attributes.key?(:'updated_date_utc_string')
|
|
457
|
+
self.updated_date_utc_string = attributes[:'updated_date_utc_string']
|
|
458
|
+
end
|
|
459
|
+
|
|
433
460
|
if attributes.key?(:'credit_notes')
|
|
434
461
|
if (value = attributes[:'credit_notes']).is_a?(Array)
|
|
435
462
|
self.credit_notes = value
|
|
@@ -550,6 +577,8 @@ module XeroRuby::Accounting
|
|
|
550
577
|
total_tax == o.total_tax &&
|
|
551
578
|
total == o.total &&
|
|
552
579
|
total_discount == o.total_discount &&
|
|
580
|
+
rounding_amount == o.rounding_amount &&
|
|
581
|
+
entered_total == o.entered_total &&
|
|
553
582
|
invoice_id == o.invoice_id &&
|
|
554
583
|
repeating_invoice_id == o.repeating_invoice_id &&
|
|
555
584
|
has_attachments == o.has_attachments &&
|
|
@@ -562,6 +591,7 @@ module XeroRuby::Accounting
|
|
|
562
591
|
fully_paid_on_date == o.fully_paid_on_date &&
|
|
563
592
|
amount_credited == o.amount_credited &&
|
|
564
593
|
updated_date_utc == o.updated_date_utc &&
|
|
594
|
+
updated_date_utc_string == o.updated_date_utc_string &&
|
|
565
595
|
credit_notes == o.credit_notes &&
|
|
566
596
|
attachments == o.attachments &&
|
|
567
597
|
has_errors == o.has_errors &&
|
|
@@ -580,7 +610,7 @@ module XeroRuby::Accounting
|
|
|
580
610
|
# Calculates hash code according to all attributes.
|
|
581
611
|
# @return [Integer] Hash code
|
|
582
612
|
def hash
|
|
583
|
-
[type, contact, line_items, date, due_date, line_amount_types, invoice_number, reference, branding_theme_id, url, currency_code, currency_rate, status, sent_to_contact, expected_payment_date, planned_payment_date, cis_deduction, cis_rate, sub_total, total_tax, total, total_discount, invoice_id, repeating_invoice_id, has_attachments, is_discounted, payments, prepayments, overpayments, amount_due, amount_paid, fully_paid_on_date, amount_credited, updated_date_utc, credit_notes, attachments, has_errors, status_attribute_string, validation_errors, warnings, invoice_addresses].hash
|
|
613
|
+
[type, contact, line_items, date, due_date, line_amount_types, invoice_number, reference, branding_theme_id, url, currency_code, currency_rate, status, sent_to_contact, expected_payment_date, planned_payment_date, cis_deduction, cis_rate, sub_total, total_tax, total, total_discount, rounding_amount, entered_total, invoice_id, repeating_invoice_id, has_attachments, is_discounted, payments, prepayments, overpayments, amount_due, amount_paid, fully_paid_on_date, amount_credited, updated_date_utc, updated_date_utc_string, credit_notes, attachments, has_errors, status_attribute_string, validation_errors, warnings, invoice_addresses].hash
|
|
584
614
|
end
|
|
585
615
|
|
|
586
616
|
# Builds the object from hash
|
|
@@ -49,9 +49,15 @@ module XeroRuby::Accounting
|
|
|
49
49
|
# The value of the item on hand. Calculated using average cost accounting.
|
|
50
50
|
attr_accessor :total_cost_pool
|
|
51
51
|
|
|
52
|
-
# The quantity of the item on hand
|
|
52
|
+
# The quantity of the item on hand. This will be 0 if `QuantityOnBackOrder` is greater than 0.
|
|
53
53
|
attr_accessor :quantity_on_hand
|
|
54
54
|
|
|
55
|
+
# The quantity of the item available. This is equal to `QuantityOnHand` - `QuantityOnBackOrder`. This value will be negative if `QuantityOnBackOrder` is greater than 0.
|
|
56
|
+
attr_accessor :quantity_available
|
|
57
|
+
|
|
58
|
+
# The quantity of the item on backorder. This will be 0 if `QuantityOnHand` is greater than 0.
|
|
59
|
+
attr_accessor :quantity_on_back_order
|
|
60
|
+
|
|
55
61
|
# Last modified date in UTC format
|
|
56
62
|
attr_accessor :updated_date_utc
|
|
57
63
|
|
|
@@ -79,6 +85,8 @@ module XeroRuby::Accounting
|
|
|
79
85
|
:'is_tracked_as_inventory' => :'IsTrackedAsInventory',
|
|
80
86
|
:'total_cost_pool' => :'TotalCostPool',
|
|
81
87
|
:'quantity_on_hand' => :'QuantityOnHand',
|
|
88
|
+
:'quantity_available' => :'QuantityAvailable',
|
|
89
|
+
:'quantity_on_back_order' => :'QuantityOnBackOrder',
|
|
82
90
|
:'updated_date_utc' => :'UpdatedDateUTC',
|
|
83
91
|
:'item_id' => :'ItemID',
|
|
84
92
|
:'status_attribute_string' => :'StatusAttributeString',
|
|
@@ -101,6 +109,8 @@ module XeroRuby::Accounting
|
|
|
101
109
|
:'is_tracked_as_inventory' => :'Boolean',
|
|
102
110
|
:'total_cost_pool' => :'BigDecimal',
|
|
103
111
|
:'quantity_on_hand' => :'BigDecimal',
|
|
112
|
+
:'quantity_available' => :'Float',
|
|
113
|
+
:'quantity_on_back_order' => :'Float',
|
|
104
114
|
:'updated_date_utc' => :'DateTime',
|
|
105
115
|
:'item_id' => :'String',
|
|
106
116
|
:'status_attribute_string' => :'String',
|
|
@@ -171,6 +181,14 @@ module XeroRuby::Accounting
|
|
|
171
181
|
self.quantity_on_hand = attributes[:'quantity_on_hand']
|
|
172
182
|
end
|
|
173
183
|
|
|
184
|
+
if attributes.key?(:'quantity_available')
|
|
185
|
+
self.quantity_available = attributes[:'quantity_available']
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if attributes.key?(:'quantity_on_back_order')
|
|
189
|
+
self.quantity_on_back_order = attributes[:'quantity_on_back_order']
|
|
190
|
+
end
|
|
191
|
+
|
|
174
192
|
if attributes.key?(:'updated_date_utc')
|
|
175
193
|
self.updated_date_utc = attributes[:'updated_date_utc']
|
|
176
194
|
end
|
|
@@ -289,6 +307,8 @@ module XeroRuby::Accounting
|
|
|
289
307
|
is_tracked_as_inventory == o.is_tracked_as_inventory &&
|
|
290
308
|
total_cost_pool == o.total_cost_pool &&
|
|
291
309
|
quantity_on_hand == o.quantity_on_hand &&
|
|
310
|
+
quantity_available == o.quantity_available &&
|
|
311
|
+
quantity_on_back_order == o.quantity_on_back_order &&
|
|
292
312
|
updated_date_utc == o.updated_date_utc &&
|
|
293
313
|
item_id == o.item_id &&
|
|
294
314
|
status_attribute_string == o.status_attribute_string &&
|
|
@@ -304,7 +324,7 @@ module XeroRuby::Accounting
|
|
|
304
324
|
# Calculates hash code according to all attributes.
|
|
305
325
|
# @return [Integer] Hash code
|
|
306
326
|
def hash
|
|
307
|
-
[code, inventory_asset_account_code, name, is_sold, is_purchased, description, purchase_description, purchase_details, sales_details, is_tracked_as_inventory, total_cost_pool, quantity_on_hand, updated_date_utc, item_id, status_attribute_string, validation_errors].hash
|
|
327
|
+
[code, inventory_asset_account_code, name, is_sold, is_purchased, description, purchase_description, purchase_details, sales_details, is_tracked_as_inventory, total_cost_pool, quantity_on_hand, quantity_available, quantity_on_back_order, updated_date_utc, item_id, status_attribute_string, validation_errors].hash
|
|
308
328
|
end
|
|
309
329
|
|
|
310
330
|
# Builds the object from hash
|
|
@@ -193,6 +193,7 @@ module XeroRuby::Accounting
|
|
|
193
193
|
COMPREHENSIVE ||= "COMPREHENSIVE".freeze
|
|
194
194
|
SIMPLE ||= "SIMPLE".freeze
|
|
195
195
|
BASICLITE ||= "BASICLITE".freeze
|
|
196
|
+
ULTRA ||= "ULTRA".freeze
|
|
196
197
|
|
|
197
198
|
# BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing)
|
|
198
199
|
attr_accessor :edition
|
|
@@ -488,7 +489,7 @@ module XeroRuby::Accounting
|
|
|
488
489
|
return false unless sales_tax_period_validator.valid?(@sales_tax_period)
|
|
489
490
|
organisation_entity_type_validator = EnumAttributeValidator.new('String', ["ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "INDIVIDUAL", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST", "PERSONAL", "SINGLEMEMBERLLC", "CCORPORATIONLLC", "PARTNERSHIPLLC", "SCORPORATIONLLC", "LLC", "NOTLLC", "UNSPECIFIED"])
|
|
490
491
|
return false unless organisation_entity_type_validator.valid?(@organisation_entity_type)
|
|
491
|
-
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE", "SIMPLE", "BASICLITE"])
|
|
492
|
+
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE", "SIMPLE", "BASICLITE", "ULTRA"])
|
|
492
493
|
return false unless _class_validator.valid?(@_class)
|
|
493
494
|
edition_validator = EnumAttributeValidator.new('String', ["BUSINESS", "PARTNER"])
|
|
494
495
|
return false unless edition_validator.valid?(@edition)
|
|
@@ -548,7 +549,7 @@ module XeroRuby::Accounting
|
|
|
548
549
|
# Custom attribute writer method checking allowed values (enum).
|
|
549
550
|
# @param [Object] _class Object to be assigned
|
|
550
551
|
def _class=(_class)
|
|
551
|
-
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE", "SIMPLE", "BASICLITE"])
|
|
552
|
+
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE", "SIMPLE", "BASICLITE", "ULTRA"])
|
|
552
553
|
unless validator.valid?(_class)
|
|
553
554
|
fail ArgumentError, "invalid value for \"_class\", must be one of #{validator.allowable_values}."
|
|
554
555
|
end
|
|
@@ -52,6 +52,9 @@ module XeroRuby::Accounting
|
|
|
52
52
|
# UTC timestamp of last update to the overpayment
|
|
53
53
|
attr_accessor :updated_date_utc
|
|
54
54
|
|
|
55
|
+
# UTC ISO-8601 formatted timestamp of last update to the overpayment
|
|
56
|
+
attr_accessor :updated_date_utc_string
|
|
57
|
+
|
|
55
58
|
|
|
56
59
|
attr_accessor :currency_code
|
|
57
60
|
|
|
@@ -117,6 +120,7 @@ module XeroRuby::Accounting
|
|
|
117
120
|
:'total_tax' => :'TotalTax',
|
|
118
121
|
:'total' => :'Total',
|
|
119
122
|
:'updated_date_utc' => :'UpdatedDateUTC',
|
|
123
|
+
:'updated_date_utc_string' => :'UpdatedDateUTCString',
|
|
120
124
|
:'currency_code' => :'CurrencyCode',
|
|
121
125
|
:'overpayment_id' => :'OverpaymentID',
|
|
122
126
|
:'currency_rate' => :'CurrencyRate',
|
|
@@ -143,6 +147,7 @@ module XeroRuby::Accounting
|
|
|
143
147
|
:'total_tax' => :'BigDecimal',
|
|
144
148
|
:'total' => :'BigDecimal',
|
|
145
149
|
:'updated_date_utc' => :'DateTime',
|
|
150
|
+
:'updated_date_utc_string' => :'String',
|
|
146
151
|
:'currency_code' => :'CurrencyCode',
|
|
147
152
|
:'overpayment_id' => :'String',
|
|
148
153
|
:'currency_rate' => :'BigDecimal',
|
|
@@ -213,6 +218,10 @@ module XeroRuby::Accounting
|
|
|
213
218
|
self.updated_date_utc = attributes[:'updated_date_utc']
|
|
214
219
|
end
|
|
215
220
|
|
|
221
|
+
if attributes.key?(:'updated_date_utc_string')
|
|
222
|
+
self.updated_date_utc_string = attributes[:'updated_date_utc_string']
|
|
223
|
+
end
|
|
224
|
+
|
|
216
225
|
if attributes.key?(:'currency_code')
|
|
217
226
|
self.currency_code = attributes[:'currency_code']
|
|
218
227
|
end
|
|
@@ -314,6 +323,7 @@ module XeroRuby::Accounting
|
|
|
314
323
|
total_tax == o.total_tax &&
|
|
315
324
|
total == o.total &&
|
|
316
325
|
updated_date_utc == o.updated_date_utc &&
|
|
326
|
+
updated_date_utc_string == o.updated_date_utc_string &&
|
|
317
327
|
currency_code == o.currency_code &&
|
|
318
328
|
overpayment_id == o.overpayment_id &&
|
|
319
329
|
currency_rate == o.currency_rate &&
|
|
@@ -335,7 +345,7 @@ module XeroRuby::Accounting
|
|
|
335
345
|
# Calculates hash code according to all attributes.
|
|
336
346
|
# @return [Integer] Hash code
|
|
337
347
|
def hash
|
|
338
|
-
[type, contact, date, status, line_amount_types, line_items, sub_total, total_tax, total, updated_date_utc, currency_code, overpayment_id, currency_rate, remaining_credit, allocations, applied_amount, payments, has_attachments, reference, attachments].hash
|
|
348
|
+
[type, contact, date, status, line_amount_types, line_items, sub_total, total_tax, total, updated_date_utc, updated_date_utc_string, currency_code, overpayment_id, currency_rate, remaining_credit, allocations, applied_amount, payments, has_attachments, reference, attachments].hash
|
|
339
349
|
end
|
|
340
350
|
|
|
341
351
|
# Builds the object from hash
|
|
@@ -80,6 +80,9 @@ module XeroRuby::Accounting
|
|
|
80
80
|
# UTC timestamp of last update to the payment
|
|
81
81
|
attr_accessor :updated_date_utc
|
|
82
82
|
|
|
83
|
+
# UTC ISO-8601 formatted timestamp of last update to the payment
|
|
84
|
+
attr_accessor :updated_date_utc_string
|
|
85
|
+
|
|
83
86
|
# The Xero identifier for an Payment e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
|
|
84
87
|
attr_accessor :payment_id
|
|
85
88
|
|
|
@@ -153,6 +156,7 @@ module XeroRuby::Accounting
|
|
|
153
156
|
:'status' => :'Status',
|
|
154
157
|
:'payment_type' => :'PaymentType',
|
|
155
158
|
:'updated_date_utc' => :'UpdatedDateUTC',
|
|
159
|
+
:'updated_date_utc_string' => :'UpdatedDateUTCString',
|
|
156
160
|
:'payment_id' => :'PaymentID',
|
|
157
161
|
:'batch_payment_id' => :'BatchPaymentID',
|
|
158
162
|
:'bank_account_number' => :'BankAccountNumber',
|
|
@@ -187,6 +191,7 @@ module XeroRuby::Accounting
|
|
|
187
191
|
:'status' => :'String',
|
|
188
192
|
:'payment_type' => :'String',
|
|
189
193
|
:'updated_date_utc' => :'DateTime',
|
|
194
|
+
:'updated_date_utc_string' => :'String',
|
|
190
195
|
:'payment_id' => :'String',
|
|
191
196
|
:'batch_payment_id' => :'String',
|
|
192
197
|
:'bank_account_number' => :'String',
|
|
@@ -287,6 +292,10 @@ module XeroRuby::Accounting
|
|
|
287
292
|
self.updated_date_utc = attributes[:'updated_date_utc']
|
|
288
293
|
end
|
|
289
294
|
|
|
295
|
+
if attributes.key?(:'updated_date_utc_string')
|
|
296
|
+
self.updated_date_utc_string = attributes[:'updated_date_utc_string']
|
|
297
|
+
end
|
|
298
|
+
|
|
290
299
|
if attributes.key?(:'payment_id')
|
|
291
300
|
self.payment_id = attributes[:'payment_id']
|
|
292
301
|
end
|
|
@@ -396,6 +405,7 @@ module XeroRuby::Accounting
|
|
|
396
405
|
status == o.status &&
|
|
397
406
|
payment_type == o.payment_type &&
|
|
398
407
|
updated_date_utc == o.updated_date_utc &&
|
|
408
|
+
updated_date_utc_string == o.updated_date_utc_string &&
|
|
399
409
|
payment_id == o.payment_id &&
|
|
400
410
|
batch_payment_id == o.batch_payment_id &&
|
|
401
411
|
bank_account_number == o.bank_account_number &&
|
|
@@ -417,7 +427,7 @@ module XeroRuby::Accounting
|
|
|
417
427
|
# Calculates hash code according to all attributes.
|
|
418
428
|
# @return [Integer] Hash code
|
|
419
429
|
def 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
|
|
430
|
+
[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, updated_date_utc_string, payment_id, batch_payment_id, bank_account_number, particulars, details, has_account, has_validation_errors, status_attribute_string, validation_errors, warnings].hash
|
|
421
431
|
end
|
|
422
432
|
|
|
423
433
|
# Builds the object from hash
|
|
@@ -59,6 +59,9 @@ module XeroRuby::Accounting
|
|
|
59
59
|
# UTC timestamp of last update to the prepayment
|
|
60
60
|
attr_accessor :updated_date_utc
|
|
61
61
|
|
|
62
|
+
# UTC ISO-8601 formatted timestamp of last update to the prepayment
|
|
63
|
+
attr_accessor :updated_date_utc_string
|
|
64
|
+
|
|
62
65
|
|
|
63
66
|
attr_accessor :currency_code
|
|
64
67
|
|
|
@@ -126,6 +129,7 @@ module XeroRuby::Accounting
|
|
|
126
129
|
:'reference' => :'Reference',
|
|
127
130
|
:'invoice_number' => :'InvoiceNumber',
|
|
128
131
|
:'updated_date_utc' => :'UpdatedDateUTC',
|
|
132
|
+
:'updated_date_utc_string' => :'UpdatedDateUTCString',
|
|
129
133
|
:'currency_code' => :'CurrencyCode',
|
|
130
134
|
:'prepayment_id' => :'PrepaymentID',
|
|
131
135
|
:'branding_theme_id' => :'BrandingThemeID',
|
|
@@ -154,6 +158,7 @@ module XeroRuby::Accounting
|
|
|
154
158
|
:'reference' => :'String',
|
|
155
159
|
:'invoice_number' => :'String',
|
|
156
160
|
:'updated_date_utc' => :'DateTime',
|
|
161
|
+
:'updated_date_utc_string' => :'String',
|
|
157
162
|
:'currency_code' => :'CurrencyCode',
|
|
158
163
|
:'prepayment_id' => :'String',
|
|
159
164
|
:'branding_theme_id' => :'String',
|
|
@@ -232,6 +237,10 @@ module XeroRuby::Accounting
|
|
|
232
237
|
self.updated_date_utc = attributes[:'updated_date_utc']
|
|
233
238
|
end
|
|
234
239
|
|
|
240
|
+
if attributes.key?(:'updated_date_utc_string')
|
|
241
|
+
self.updated_date_utc_string = attributes[:'updated_date_utc_string']
|
|
242
|
+
end
|
|
243
|
+
|
|
235
244
|
if attributes.key?(:'currency_code')
|
|
236
245
|
self.currency_code = attributes[:'currency_code']
|
|
237
246
|
end
|
|
@@ -335,6 +344,7 @@ module XeroRuby::Accounting
|
|
|
335
344
|
reference == o.reference &&
|
|
336
345
|
invoice_number == o.invoice_number &&
|
|
337
346
|
updated_date_utc == o.updated_date_utc &&
|
|
347
|
+
updated_date_utc_string == o.updated_date_utc_string &&
|
|
338
348
|
currency_code == o.currency_code &&
|
|
339
349
|
prepayment_id == o.prepayment_id &&
|
|
340
350
|
branding_theme_id == o.branding_theme_id &&
|
|
@@ -356,7 +366,7 @@ module XeroRuby::Accounting
|
|
|
356
366
|
# Calculates hash code according to all attributes.
|
|
357
367
|
# @return [Integer] Hash code
|
|
358
368
|
def hash
|
|
359
|
-
[type, contact, date, status, line_amount_types, line_items, sub_total, total_tax, total, reference, invoice_number, updated_date_utc, currency_code, prepayment_id, branding_theme_id, currency_rate, remaining_credit, allocations, payments, applied_amount, has_attachments, attachments].hash
|
|
369
|
+
[type, contact, date, status, line_amount_types, line_items, sub_total, total_tax, total, reference, invoice_number, updated_date_utc, updated_date_utc_string, currency_code, prepayment_id, branding_theme_id, currency_rate, remaining_credit, allocations, payments, applied_amount, has_attachments, attachments].hash
|
|
360
370
|
end
|
|
361
371
|
|
|
362
372
|
# Builds the object from hash
|