xero-ruby 1.1.0 → 1.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/Gemfile.lock +68 -0
- data/docs/accounting/AccountingApi.md +1497 -785
- data/docs/accounting/Allocation.md +11 -1
- data/docs/accounting/BankTransfer.md +1 -1
- data/docs/accounting/BatchPayment.md +1 -1
- data/docs/accounting/Contact.md +2 -2
- data/docs/accounting/CreditNote.md +2 -2
- data/docs/accounting/Invoice.md +2 -2
- data/docs/accounting/Organisation.md +2 -0
- data/docs/accounting/Payment.md +4 -4
- data/docs/accounting/Quote.md +5 -1
- data/docs/assets/AssetApi.md +40 -16
- data/docs/assets/AssetType.md +1 -1
- data/docs/projects/Amount.md +19 -0
- data/docs/projects/ChargeType.md +16 -0
- data/docs/projects/CurrencyCode.md +16 -0
- data/docs/projects/Error.md +19 -0
- data/docs/projects/Pagination.md +23 -0
- data/docs/projects/Project.md +59 -0
- data/docs/projects/ProjectApi.md +979 -0
- data/docs/projects/ProjectCreateOrUpdate.md +23 -0
- data/docs/projects/ProjectPatch.md +17 -0
- data/docs/projects/ProjectStatus.md +16 -0
- data/docs/projects/ProjectUser.md +21 -0
- data/docs/projects/ProjectUsers.md +19 -0
- data/docs/projects/Projects.md +19 -0
- data/docs/projects/Task.md +45 -0
- data/docs/projects/TaskCreateOrUpdate.md +23 -0
- data/docs/projects/Tasks.md +19 -0
- data/docs/projects/TimeEntries.md +19 -0
- data/docs/projects/TimeEntry.md +33 -0
- data/docs/projects/TimeEntryCreateOrUpdate.md +25 -0
- data/lib/xero-ruby.rb +21 -2
- data/lib/xero-ruby/api/accounting_api.rb +77 -85
- data/lib/xero-ruby/api/asset_api.rb +3 -3
- data/lib/xero-ruby/api/project_api.rb +1035 -0
- data/lib/xero-ruby/api_client.rb +33 -7
- data/lib/xero-ruby/api_error.rb +2 -2
- data/lib/xero-ruby/configuration.rb +4 -2
- data/lib/xero-ruby/models/accounting/account.rb +56 -20
- data/lib/xero-ruby/models/accounting/account_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/accounts.rb +4 -3
- data/lib/xero-ruby/models/accounting/accounts_payable.rb +5 -3
- data/lib/xero-ruby/models/accounting/accounts_receivable.rb +5 -3
- data/lib/xero-ruby/models/accounting/address.rb +15 -12
- data/lib/xero-ruby/models/accounting/allocation.rb +61 -8
- data/lib/xero-ruby/models/accounting/allocations.rb +4 -3
- data/lib/xero-ruby/models/accounting/attachment.rb +8 -8
- data/lib/xero-ruby/models/accounting/attachments.rb +4 -3
- data/lib/xero-ruby/models/accounting/balances.rb +5 -3
- data/lib/xero-ruby/models/accounting/bank_transaction.rb +35 -20
- data/lib/xero-ruby/models/accounting/bank_transactions.rb +4 -3
- data/lib/xero-ruby/models/accounting/bank_transfer.rb +15 -13
- data/lib/xero-ruby/models/accounting/bank_transfers.rb +4 -3
- data/lib/xero-ruby/models/accounting/batch_payment.rb +24 -18
- data/lib/xero-ruby/models/accounting/batch_payment_details.rb +7 -7
- data/lib/xero-ruby/models/accounting/batch_payments.rb +4 -3
- data/lib/xero-ruby/models/accounting/bill.rb +4 -3
- data/lib/xero-ruby/models/accounting/branding_theme.rb +9 -8
- data/lib/xero-ruby/models/accounting/branding_themes.rb +4 -3
- data/lib/xero-ruby/models/accounting/cis_org_setting.rb +5 -5
- data/lib/xero-ruby/models/accounting/cis_setting.rb +4 -4
- data/lib/xero-ruby/models/accounting/cis_settings.rb +4 -3
- data/lib/xero-ruby/models/accounting/contact.rb +46 -36
- data/lib/xero-ruby/models/accounting/contact_group.rb +8 -6
- data/lib/xero-ruby/models/accounting/contact_groups.rb +4 -3
- data/lib/xero-ruby/models/accounting/contact_person.rb +6 -6
- data/lib/xero-ruby/models/accounting/contacts.rb +4 -3
- data/lib/xero-ruby/models/accounting/country_code.rb +2 -2
- data/lib/xero-ruby/models/accounting/credit_note.rb +38 -25
- data/lib/xero-ruby/models/accounting/credit_notes.rb +4 -3
- data/lib/xero-ruby/models/accounting/currencies.rb +4 -3
- data/lib/xero-ruby/models/accounting/currency.rb +5 -4
- data/lib/xero-ruby/models/accounting/currency_code.rb +2 -2
- data/lib/xero-ruby/models/accounting/element.rb +10 -4
- data/lib/xero-ruby/models/accounting/employee.rb +13 -8
- data/lib/xero-ruby/models/accounting/employees.rb +4 -3
- data/lib/xero-ruby/models/accounting/error.rb +6 -6
- data/lib/xero-ruby/models/accounting/expense_claim.rb +19 -12
- data/lib/xero-ruby/models/accounting/expense_claims.rb +4 -3
- data/lib/xero-ruby/models/accounting/external_link.rb +10 -4
- data/lib/xero-ruby/models/accounting/history_record.rb +6 -6
- data/lib/xero-ruby/models/accounting/history_records.rb +4 -3
- data/lib/xero-ruby/models/accounting/invoice.rb +56 -37
- data/lib/xero-ruby/models/accounting/invoice_reminder.rb +3 -3
- data/lib/xero-ruby/models/accounting/invoice_reminders.rb +4 -3
- data/lib/xero-ruby/models/accounting/invoices.rb +4 -3
- data/lib/xero-ruby/models/accounting/item.rb +18 -16
- data/lib/xero-ruby/models/accounting/items.rb +4 -3
- data/lib/xero-ruby/models/accounting/journal.rb +35 -10
- data/lib/xero-ruby/models/accounting/journal_line.rb +14 -13
- data/lib/xero-ruby/models/accounting/journals.rb +4 -3
- data/lib/xero-ruby/models/accounting/line_amount_types.rb +2 -2
- data/lib/xero-ruby/models/accounting/line_item.rb +15 -15
- data/lib/xero-ruby/models/accounting/line_item_tracking.rb +6 -6
- data/lib/xero-ruby/models/accounting/linked_transaction.rb +21 -13
- data/lib/xero-ruby/models/accounting/linked_transactions.rb +4 -3
- data/lib/xero-ruby/models/accounting/manual_journal.rb +21 -15
- data/lib/xero-ruby/models/accounting/manual_journal_line.rb +9 -9
- data/lib/xero-ruby/models/accounting/manual_journals.rb +4 -3
- data/lib/xero-ruby/models/accounting/online_invoice.rb +3 -3
- data/lib/xero-ruby/models/accounting/online_invoices.rb +4 -3
- data/lib/xero-ruby/models/accounting/organisation.rb +103 -43
- data/lib/xero-ruby/models/accounting/organisations.rb +4 -3
- data/lib/xero-ruby/models/accounting/overpayment.rb +27 -18
- data/lib/xero-ruby/models/accounting/overpayments.rb +4 -3
- data/lib/xero-ruby/models/accounting/payment.rb +41 -22
- data/lib/xero-ruby/models/accounting/payment_delete.rb +3 -3
- data/lib/xero-ruby/models/accounting/payment_service.rb +8 -8
- data/lib/xero-ruby/models/accounting/payment_services.rb +4 -3
- data/lib/xero-ruby/models/accounting/payment_term.rb +5 -3
- data/lib/xero-ruby/models/accounting/payment_term_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/payments.rb +4 -3
- data/lib/xero-ruby/models/accounting/phone.rb +12 -6
- data/lib/xero-ruby/models/accounting/prepayment.rb +28 -18
- data/lib/xero-ruby/models/accounting/prepayments.rb +4 -3
- data/lib/xero-ruby/models/accounting/purchase.rb +6 -6
- data/lib/xero-ruby/models/accounting/purchase_order.rb +36 -28
- data/lib/xero-ruby/models/accounting/purchase_orders.rb +4 -3
- data/lib/xero-ruby/models/accounting/quote.rb +50 -24
- data/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +2 -2
- data/lib/xero-ruby/models/accounting/quote_status_codes.rb +2 -2
- data/lib/xero-ruby/models/accounting/quotes.rb +4 -3
- data/lib/xero-ruby/models/accounting/receipt.rb +25 -16
- data/lib/xero-ruby/models/accounting/receipts.rb +4 -3
- data/lib/xero-ruby/models/accounting/repeating_invoice.rb +23 -14
- data/lib/xero-ruby/models/accounting/repeating_invoices.rb +4 -3
- data/lib/xero-ruby/models/accounting/report.rb +10 -8
- data/lib/xero-ruby/models/accounting/report_attribute.rb +5 -3
- data/lib/xero-ruby/models/accounting/report_cell.rb +5 -3
- data/lib/xero-ruby/models/accounting/report_fields.rb +6 -3
- data/lib/xero-ruby/models/accounting/report_row.rb +6 -3
- data/lib/xero-ruby/models/accounting/report_rows.rb +7 -3
- data/lib/xero-ruby/models/accounting/report_with_row.rb +11 -9
- data/lib/xero-ruby/models/accounting/report_with_rows.rb +4 -3
- data/lib/xero-ruby/models/accounting/reports.rb +4 -3
- data/lib/xero-ruby/models/accounting/request_empty.rb +3 -3
- data/lib/xero-ruby/models/accounting/row_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/sales_tracking_category.rb +4 -4
- data/lib/xero-ruby/models/accounting/schedule.rb +19 -11
- data/lib/xero-ruby/models/accounting/tax_component.rb +6 -6
- data/lib/xero-ruby/models/accounting/tax_rate.rb +94 -16
- data/lib/xero-ruby/models/accounting/tax_rates.rb +4 -3
- data/lib/xero-ruby/models/accounting/tax_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/ten_nintey_nine_contact.rb +24 -24
- data/lib/xero-ruby/models/accounting/time_zone.rb +2 -2
- data/lib/xero-ruby/models/accounting/tracking_categories.rb +4 -3
- data/lib/xero-ruby/models/accounting/tracking_category.rb +11 -8
- data/lib/xero-ruby/models/accounting/tracking_option.rb +9 -6
- data/lib/xero-ruby/models/accounting/tracking_options.rb +4 -3
- data/lib/xero-ruby/models/accounting/user.rb +16 -9
- data/lib/xero-ruby/models/accounting/users.rb +4 -3
- data/lib/xero-ruby/models/accounting/validation_error.rb +3 -3
- data/lib/xero-ruby/models/assets/asset.rb +17 -14
- data/lib/xero-ruby/models/assets/asset_status.rb +2 -2
- data/lib/xero-ruby/models/assets/asset_status_query_param.rb +2 -2
- data/lib/xero-ruby/models/assets/asset_type.rb +9 -13
- data/lib/xero-ruby/models/assets/assets.rb +5 -3
- data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +9 -9
- data/lib/xero-ruby/models/assets/book_depreciation_setting.rb +21 -10
- data/lib/xero-ruby/models/assets/error.rb +7 -7
- data/lib/xero-ruby/models/assets/field_validation_errors_element.rb +8 -8
- data/lib/xero-ruby/models/assets/pagination.rb +7 -3
- data/lib/xero-ruby/models/assets/resource_validation_errors_element.rb +7 -7
- data/lib/xero-ruby/models/assets/setting.rb +10 -10
- data/lib/xero-ruby/models/projects/amount.rb +214 -0
- data/lib/xero-ruby/models/projects/charge_type.rb +38 -0
- data/lib/xero-ruby/models/projects/currency_code.rb +199 -0
- data/lib/xero-ruby/models/projects/error.rb +214 -0
- data/lib/xero-ruby/models/projects/pagination.rb +234 -0
- data/lib/xero-ruby/models/projects/project.rb +419 -0
- data/lib/xero-ruby/models/projects/project_create_or_update.rb +239 -0
- data/lib/xero-ruby/models/projects/project_patch.rb +209 -0
- data/lib/xero-ruby/models/projects/project_status.rb +37 -0
- data/lib/xero-ruby/models/projects/project_user.rb +224 -0
- data/lib/xero-ruby/models/projects/project_users.rb +216 -0
- data/lib/xero-ruby/models/projects/projects.rb +216 -0
- data/lib/xero-ruby/models/projects/task.rb +381 -0
- data/lib/xero-ruby/models/projects/task_create_or_update.rb +249 -0
- data/lib/xero-ruby/models/projects/tasks.rb +216 -0
- data/lib/xero-ruby/models/projects/time_entries.rb +216 -0
- data/lib/xero-ruby/models/projects/time_entry.rb +320 -0
- data/lib/xero-ruby/models/projects/time_entry_create_or_update.rb +264 -0
- data/lib/xero-ruby/version.rb +3 -3
- data/spec/accounting/api/accounting_api_spec.rb +3 -3
- data/spec/api_client_spec.rb +23 -23
- data/spec/assets/api/asset_api_spec.rb +3 -3
- data/spec/configuration_spec.rb +7 -23
- data/spec/projects/api/project_api_spec.rb +229 -0
- data/spec/projects/models/amount_spec.rb +47 -0
- data/spec/projects/models/charge_type_spec.rb +35 -0
- data/spec/projects/models/currency_code_spec.rb +35 -0
- data/spec/projects/models/error_spec.rb +47 -0
- data/spec/projects/models/pagination_spec.rb +59 -0
- data/spec/projects/models/project_create_or_update_spec.rb +59 -0
- data/spec/projects/models/project_patch_spec.rb +41 -0
- data/spec/projects/models/project_spec.rb +167 -0
- data/spec/projects/models/project_status_spec.rb +35 -0
- data/spec/projects/models/project_user_spec.rb +53 -0
- data/spec/projects/models/project_users_spec.rb +47 -0
- data/spec/projects/models/projects_spec.rb +47 -0
- data/spec/projects/models/task_create_or_update_spec.rb +59 -0
- data/spec/projects/models/task_spec.rb +129 -0
- data/spec/projects/models/tasks_spec.rb +47 -0
- data/spec/projects/models/time_entries_spec.rb +47 -0
- data/spec/projects/models/time_entry_create_or_update_spec.rb +65 -0
- data/spec/projects/models/time_entry_spec.rb +93 -0
- data/xero-ruby.gem +0 -0
- data/xero-ruby.gemspec +3 -3
- metadata +83 -7
- data/xero-ruby-1.0.gem +0 -0
data/lib/xero-ruby/api_client.rb
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.3.
|
|
9
|
+
OpenAPI Generator version: 4.3.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'json'
|
|
15
15
|
require 'logger'
|
|
16
16
|
require 'tempfile'
|
|
17
|
+
require 'find'
|
|
17
18
|
require 'faraday'
|
|
18
19
|
|
|
19
20
|
module XeroRuby
|
|
@@ -56,6 +57,11 @@ module XeroRuby
|
|
|
56
57
|
XeroRuby::AssetApi.new(self)
|
|
57
58
|
end
|
|
58
59
|
|
|
60
|
+
def project_api
|
|
61
|
+
@config.base_url = @config.project_url
|
|
62
|
+
XeroRuby::ProjectApi.new(self)
|
|
63
|
+
end
|
|
64
|
+
|
|
59
65
|
# Token Helpers
|
|
60
66
|
def token_set
|
|
61
67
|
XeroRuby.configure.token_set
|
|
@@ -293,9 +299,9 @@ module XeroRuby
|
|
|
293
299
|
else
|
|
294
300
|
raise e
|
|
295
301
|
end
|
|
296
|
-
end
|
|
302
|
+
end
|
|
297
303
|
|
|
298
|
-
convert_to_type
|
|
304
|
+
convert_to_type(data, return_type)
|
|
299
305
|
end
|
|
300
306
|
|
|
301
307
|
# Convert data to the given return type.
|
|
@@ -333,14 +339,34 @@ module XeroRuby
|
|
|
333
339
|
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
|
334
340
|
end
|
|
335
341
|
else
|
|
336
|
-
|
|
342
|
+
api_set = api_set_prefix(return_type)
|
|
343
|
+
case api_set
|
|
344
|
+
when 'accounting'
|
|
337
345
|
XeroRuby::Accounting.const_get(return_type).build_from_hash(data)
|
|
338
|
-
|
|
346
|
+
when 'assets'
|
|
339
347
|
XeroRuby::Assets.const_get(return_type).build_from_hash(data)
|
|
340
|
-
|
|
348
|
+
when 'projects'
|
|
349
|
+
XeroRuby::Projects.const_get(return_type).build_from_hash(data)
|
|
350
|
+
# when 'newapiset' # add new namespace
|
|
341
351
|
# XeroRuby::<NewAPISet>.const_get(return_type).build_from_hash(data)
|
|
352
|
+
else
|
|
353
|
+
XeroRuby::Accounting.const_get(return_type).build_from_hash(data)
|
|
354
|
+
end
|
|
355
|
+
end
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# Traverses the model tree to find the model's namespacing
|
|
359
|
+
# based on the deserializing model/return_type name
|
|
360
|
+
def api_set_prefix(return_type)
|
|
361
|
+
api_set = ''
|
|
362
|
+
Find.find("#{File.dirname(__FILE__)}/models/") do |path|
|
|
363
|
+
model_path = path.split('/')
|
|
364
|
+
matching_name = model_path.last.gsub('.rb','').gsub("_",'')
|
|
365
|
+
if return_type.downcase === matching_name
|
|
366
|
+
api_set = path.split('/')[-2]
|
|
342
367
|
end
|
|
343
368
|
end
|
|
369
|
+
return api_set
|
|
344
370
|
end
|
|
345
371
|
|
|
346
372
|
# Save response body into a file in (the defined) temporary folder, using the filename
|
data/lib/xero-ruby/api_error.rb
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.3.
|
|
9
|
+
OpenAPI Generator version: 4.3.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.3.
|
|
9
|
+
OpenAPI Generator version: 4.3.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -29,6 +29,7 @@ module XeroRuby
|
|
|
29
29
|
# Defines base paths for seperate API's
|
|
30
30
|
attr_accessor :accounting_url
|
|
31
31
|
attr_accessor :asset_url
|
|
32
|
+
attr_accessor :project_url
|
|
32
33
|
|
|
33
34
|
# Defines API keys used with API Key authentications.
|
|
34
35
|
#
|
|
@@ -140,6 +141,7 @@ module XeroRuby
|
|
|
140
141
|
@token_url = 'https://identity.xero.com/connect/token'
|
|
141
142
|
@accounting_url = 'https://api.xero.com/api.xro/2.0'
|
|
142
143
|
@asset_url = 'https://api.xero.com/assets.xro/1.0'
|
|
144
|
+
@project_url = 'https://api.xero.com/projects.xro/2.0/'
|
|
143
145
|
@api_key = {}
|
|
144
146
|
@api_key_prefix = {}
|
|
145
147
|
@timeout = 0
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.3.
|
|
9
|
+
OpenAPI Generator version: 4.3.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -17,62 +17,98 @@ module XeroRuby::Accounting
|
|
|
17
17
|
class Account
|
|
18
18
|
# Customer defined alpha numeric account code e.g 200 or SALES (max length = 10)
|
|
19
19
|
attr_accessor :code
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
# Name of account (max length = 150)
|
|
22
22
|
attr_accessor :name
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
# The Xero identifier for an account – specified as a string following the endpoint name e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9
|
|
25
25
|
attr_accessor :account_id
|
|
26
|
+
|
|
26
27
|
|
|
27
28
|
attr_accessor :type
|
|
28
|
-
|
|
29
|
+
|
|
29
30
|
# For bank accounts only (Account Type BANK)
|
|
30
31
|
attr_accessor :bank_account_number
|
|
31
|
-
|
|
32
|
+
|
|
32
33
|
# Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes
|
|
33
34
|
attr_accessor :status
|
|
34
|
-
|
|
35
|
+
ACTIVE = "ACTIVE".freeze
|
|
36
|
+
ARCHIVED = "ARCHIVED".freeze
|
|
37
|
+
DELETED = "DELETED".freeze
|
|
38
|
+
|
|
35
39
|
# Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000)
|
|
36
40
|
attr_accessor :description
|
|
37
|
-
|
|
41
|
+
|
|
38
42
|
# For bank accounts only. See Bank Account types
|
|
39
43
|
attr_accessor :bank_account_type
|
|
44
|
+
BANK = "BANK".freeze
|
|
45
|
+
CREDITCARD = "CREDITCARD".freeze
|
|
46
|
+
PAYPAL = "PAYPAL".freeze
|
|
47
|
+
NONE = "NONE".freeze
|
|
48
|
+
EMPTY = "".freeze
|
|
49
|
+
|
|
40
50
|
|
|
41
51
|
attr_accessor :currency_code
|
|
42
|
-
|
|
52
|
+
|
|
43
53
|
# The tax type from TaxRates
|
|
44
54
|
attr_accessor :tax_type
|
|
45
|
-
|
|
55
|
+
|
|
46
56
|
# Boolean – describes whether account can have payments applied to it
|
|
47
57
|
attr_accessor :enable_payments_to_account
|
|
48
|
-
|
|
58
|
+
|
|
49
59
|
# Boolean – describes whether account code is available for use with expense claims
|
|
50
60
|
attr_accessor :show_in_expense_claims
|
|
51
|
-
|
|
61
|
+
|
|
52
62
|
# See Account Class Types
|
|
53
63
|
attr_accessor :_class
|
|
54
|
-
|
|
64
|
+
ASSET = "ASSET".freeze
|
|
65
|
+
EQUITY = "EQUITY".freeze
|
|
66
|
+
EXPENSE = "EXPENSE".freeze
|
|
67
|
+
LIABILITY = "LIABILITY".freeze
|
|
68
|
+
REVENUE = "REVENUE".freeze
|
|
69
|
+
|
|
55
70
|
# If this is a system account then this element is returned. See System Account types. Note that non-system accounts may have this element set as either “” or null.
|
|
56
71
|
attr_accessor :system_account
|
|
57
|
-
|
|
72
|
+
DEBTORS = "DEBTORS".freeze
|
|
73
|
+
CREDITORS = "CREDITORS".freeze
|
|
74
|
+
BANKCURRENCYGAIN = "BANKCURRENCYGAIN".freeze
|
|
75
|
+
GST = "GST".freeze
|
|
76
|
+
GSTONIMPORTS = "GSTONIMPORTS".freeze
|
|
77
|
+
HISTORICAL = "HISTORICAL".freeze
|
|
78
|
+
REALISEDCURRENCYGAIN = "REALISEDCURRENCYGAIN".freeze
|
|
79
|
+
RETAINEDEARNINGS = "RETAINEDEARNINGS".freeze
|
|
80
|
+
ROUNDING = "ROUNDING".freeze
|
|
81
|
+
TRACKINGTRANSFERS = "TRACKINGTRANSFERS".freeze
|
|
82
|
+
UNPAIDEXPCLM = "UNPAIDEXPCLM".freeze
|
|
83
|
+
UNREALISEDCURRENCYGAIN = "UNREALISEDCURRENCYGAIN".freeze
|
|
84
|
+
WAGEPAYABLES = "WAGEPAYABLES".freeze
|
|
85
|
+
CISASSETS = "CISASSETS".freeze
|
|
86
|
+
CISASSET = "CISASSET".freeze
|
|
87
|
+
CISLABOUR = "CISLABOUR".freeze
|
|
88
|
+
CISLABOUREXPENSE = "CISLABOUREXPENSE".freeze
|
|
89
|
+
CISLABOURINCOME = "CISLABOURINCOME".freeze
|
|
90
|
+
CISLIABILITY = "CISLIABILITY".freeze
|
|
91
|
+
CISMATERIALS = "CISMATERIALS".freeze
|
|
92
|
+
EMPTY = "".freeze
|
|
93
|
+
|
|
58
94
|
# Shown if set
|
|
59
95
|
attr_accessor :reporting_code
|
|
60
|
-
|
|
96
|
+
|
|
61
97
|
# Shown if set
|
|
62
98
|
attr_accessor :reporting_code_name
|
|
63
|
-
|
|
99
|
+
|
|
64
100
|
# boolean to indicate if an account has an attachment (read only)
|
|
65
101
|
attr_accessor :has_attachments
|
|
66
|
-
|
|
102
|
+
|
|
67
103
|
# Last modified date UTC format
|
|
68
104
|
attr_accessor :updated_date_utc
|
|
69
|
-
|
|
105
|
+
|
|
70
106
|
# Boolean – describes whether the account is shown in the watchlist widget on the dashboard
|
|
71
107
|
attr_accessor :add_to_watchlist
|
|
72
|
-
|
|
108
|
+
|
|
73
109
|
# Displays array of validation error messages from the API
|
|
74
110
|
attr_accessor :validation_errors
|
|
75
|
-
|
|
111
|
+
|
|
76
112
|
class EnumAttributeValidator
|
|
77
113
|
attr_reader :datatype
|
|
78
114
|
attr_reader :allowable_values
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.3.
|
|
9
|
+
OpenAPI Generator version: 4.3.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.3.
|
|
9
|
+
OpenAPI Generator version: 4.3.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,8 +15,9 @@ require 'date'
|
|
|
15
15
|
|
|
16
16
|
module XeroRuby::Accounting
|
|
17
17
|
class Accounts
|
|
18
|
-
attr_accessor :accounts
|
|
19
18
|
|
|
19
|
+
attr_accessor :accounts
|
|
20
|
+
|
|
20
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
22
|
def self.attribute_map
|
|
22
23
|
{
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.3.
|
|
9
|
+
OpenAPI Generator version: 4.3.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,10 +15,12 @@ require 'date'
|
|
|
15
15
|
|
|
16
16
|
module XeroRuby::Accounting
|
|
17
17
|
class AccountsPayable
|
|
18
|
+
|
|
18
19
|
attr_accessor :outstanding
|
|
20
|
+
|
|
19
21
|
|
|
20
22
|
attr_accessor :overdue
|
|
21
|
-
|
|
23
|
+
|
|
22
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
25
|
def self.attribute_map
|
|
24
26
|
{
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.3.
|
|
9
|
+
OpenAPI Generator version: 4.3.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,10 +15,12 @@ require 'date'
|
|
|
15
15
|
|
|
16
16
|
module XeroRuby::Accounting
|
|
17
17
|
class AccountsReceivable
|
|
18
|
+
|
|
18
19
|
attr_accessor :outstanding
|
|
20
|
+
|
|
19
21
|
|
|
20
22
|
attr_accessor :overdue
|
|
21
|
-
|
|
23
|
+
|
|
22
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
25
|
def self.attribute_map
|
|
24
26
|
{
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.3.
|
|
9
|
+
OpenAPI Generator version: 4.3.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -17,34 +17,37 @@ module XeroRuby::Accounting
|
|
|
17
17
|
class Address
|
|
18
18
|
# define the type of address
|
|
19
19
|
attr_accessor :address_type
|
|
20
|
-
|
|
20
|
+
POBOX = "POBOX".freeze
|
|
21
|
+
STREET = "STREET".freeze
|
|
22
|
+
DELIVERY = "DELIVERY".freeze
|
|
23
|
+
|
|
21
24
|
# max length = 500
|
|
22
25
|
attr_accessor :address_line1
|
|
23
|
-
|
|
26
|
+
|
|
24
27
|
# max length = 500
|
|
25
28
|
attr_accessor :address_line2
|
|
26
|
-
|
|
29
|
+
|
|
27
30
|
# max length = 500
|
|
28
31
|
attr_accessor :address_line3
|
|
29
|
-
|
|
32
|
+
|
|
30
33
|
# max length = 500
|
|
31
34
|
attr_accessor :address_line4
|
|
32
|
-
|
|
35
|
+
|
|
33
36
|
# max length = 255
|
|
34
37
|
attr_accessor :city
|
|
35
|
-
|
|
38
|
+
|
|
36
39
|
# max length = 255
|
|
37
40
|
attr_accessor :region
|
|
38
|
-
|
|
41
|
+
|
|
39
42
|
# max length = 50
|
|
40
43
|
attr_accessor :postal_code
|
|
41
|
-
|
|
44
|
+
|
|
42
45
|
# max length = 50, [A-Z], [a-z] only
|
|
43
46
|
attr_accessor :country
|
|
44
|
-
|
|
47
|
+
|
|
45
48
|
# max length = 255
|
|
46
49
|
attr_accessor :attention_to
|
|
47
|
-
|
|
50
|
+
|
|
48
51
|
class EnumAttributeValidator
|
|
49
52
|
attr_reader :datatype
|
|
50
53
|
attr_reader :allowable_values
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.3.
|
|
9
|
+
OpenAPI Generator version: 4.3.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,20 +15,41 @@ require 'date'
|
|
|
15
15
|
|
|
16
16
|
module XeroRuby::Accounting
|
|
17
17
|
class Allocation
|
|
18
|
+
|
|
18
19
|
attr_accessor :invoice
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
attr_accessor :overpayment
|
|
23
|
+
|
|
19
24
|
|
|
25
|
+
attr_accessor :prepayment
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
attr_accessor :credit_note
|
|
29
|
+
|
|
20
30
|
# the amount being applied to the invoice
|
|
21
31
|
attr_accessor :amount
|
|
22
|
-
|
|
32
|
+
|
|
23
33
|
# the date the allocation is applied YYYY-MM-DD.
|
|
24
34
|
attr_accessor :date
|
|
25
|
-
|
|
35
|
+
|
|
36
|
+
# A string to indicate if a invoice status
|
|
37
|
+
attr_accessor :status_attribute_string
|
|
38
|
+
|
|
39
|
+
# Displays array of validation error messages from the API
|
|
40
|
+
attr_accessor :validation_errors
|
|
41
|
+
|
|
26
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
43
|
def self.attribute_map
|
|
28
44
|
{
|
|
29
45
|
:'invoice' => :'Invoice',
|
|
46
|
+
:'overpayment' => :'Overpayment',
|
|
47
|
+
:'prepayment' => :'Prepayment',
|
|
48
|
+
:'credit_note' => :'CreditNote',
|
|
30
49
|
:'amount' => :'Amount',
|
|
31
|
-
:'date' => :'Date'
|
|
50
|
+
:'date' => :'Date',
|
|
51
|
+
:'status_attribute_string' => :'StatusAttributeString',
|
|
52
|
+
:'validation_errors' => :'ValidationErrors'
|
|
32
53
|
}
|
|
33
54
|
end
|
|
34
55
|
|
|
@@ -36,8 +57,13 @@ module XeroRuby::Accounting
|
|
|
36
57
|
def self.openapi_types
|
|
37
58
|
{
|
|
38
59
|
:'invoice' => :'Invoice',
|
|
60
|
+
:'overpayment' => :'Overpayment',
|
|
61
|
+
:'prepayment' => :'Prepayment',
|
|
62
|
+
:'credit_note' => :'CreditNote',
|
|
39
63
|
:'amount' => :'Float',
|
|
40
|
-
:'date' => :'Date'
|
|
64
|
+
:'date' => :'Date',
|
|
65
|
+
:'status_attribute_string' => :'String',
|
|
66
|
+
:'validation_errors' => :'Array<ValidationError>'
|
|
41
67
|
}
|
|
42
68
|
end
|
|
43
69
|
|
|
@@ -60,6 +86,18 @@ module XeroRuby::Accounting
|
|
|
60
86
|
self.invoice = attributes[:'invoice']
|
|
61
87
|
end
|
|
62
88
|
|
|
89
|
+
if attributes.key?(:'overpayment')
|
|
90
|
+
self.overpayment = attributes[:'overpayment']
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'prepayment')
|
|
94
|
+
self.prepayment = attributes[:'prepayment']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'credit_note')
|
|
98
|
+
self.credit_note = attributes[:'credit_note']
|
|
99
|
+
end
|
|
100
|
+
|
|
63
101
|
if attributes.key?(:'amount')
|
|
64
102
|
self.amount = attributes[:'amount']
|
|
65
103
|
end
|
|
@@ -67,6 +105,16 @@ module XeroRuby::Accounting
|
|
|
67
105
|
if attributes.key?(:'date')
|
|
68
106
|
self.date = attributes[:'date']
|
|
69
107
|
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'status_attribute_string')
|
|
110
|
+
self.status_attribute_string = attributes[:'status_attribute_string']
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'validation_errors')
|
|
114
|
+
if (value = attributes[:'validation_errors']).is_a?(Array)
|
|
115
|
+
self.validation_errors = value
|
|
116
|
+
end
|
|
117
|
+
end
|
|
70
118
|
end
|
|
71
119
|
|
|
72
120
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -103,8 +151,13 @@ module XeroRuby::Accounting
|
|
|
103
151
|
return true if self.equal?(o)
|
|
104
152
|
self.class == o.class &&
|
|
105
153
|
invoice == o.invoice &&
|
|
154
|
+
overpayment == o.overpayment &&
|
|
155
|
+
prepayment == o.prepayment &&
|
|
156
|
+
credit_note == o.credit_note &&
|
|
106
157
|
amount == o.amount &&
|
|
107
|
-
date == o.date
|
|
158
|
+
date == o.date &&
|
|
159
|
+
status_attribute_string == o.status_attribute_string &&
|
|
160
|
+
validation_errors == o.validation_errors
|
|
108
161
|
end
|
|
109
162
|
|
|
110
163
|
# @see the `==` method
|
|
@@ -116,7 +169,7 @@ module XeroRuby::Accounting
|
|
|
116
169
|
# Calculates hash code according to all attributes.
|
|
117
170
|
# @return [Integer] Hash code
|
|
118
171
|
def hash
|
|
119
|
-
[invoice, amount, date].hash
|
|
172
|
+
[invoice, overpayment, prepayment, credit_note, amount, date, status_attribute_string, validation_errors].hash
|
|
120
173
|
end
|
|
121
174
|
|
|
122
175
|
# Builds the object from hash
|