xero-ruby 1.1.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +181 -72
- data/build_notes.md +43 -0
- data/docs/accounting/AccountingApi.md +1503 -779
- data/docs/accounting/Allocation.md +11 -1
- data/docs/accounting/Attachment.md +1 -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/ManualJournalLine.md +2 -0
- data/docs/accounting/Organisation.md +3 -1
- data/docs/accounting/Payment.md +4 -4
- data/docs/accounting/Quote.md +5 -1
- data/docs/accounting/Report.md +1 -1
- data/docs/accounting/{TenNinteyNineContact.md → TenNinetyNineContact.md} +2 -2
- 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 +22 -3
- data/lib/xero-ruby/api/accounting_api.rb +1368 -72
- data/lib/xero-ruby/api/asset_api.rb +39 -3
- data/lib/xero-ruby/api/project_api.rb +1113 -0
- data/lib/xero-ruby/api_client.rb +104 -38
- data/lib/xero-ruby/api_error.rb +2 -2
- data/lib/xero-ruby/configuration.rb +4 -5
- data/lib/xero-ruby/models/accounting/account.rb +61 -20
- data/lib/xero-ruby/models/accounting/account_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/accounts.rb +8 -3
- data/lib/xero-ruby/models/accounting/accounts_payable.rb +11 -5
- data/lib/xero-ruby/models/accounting/accounts_receivable.rb +11 -5
- data/lib/xero-ruby/models/accounting/address.rb +19 -12
- data/lib/xero-ruby/models/accounting/allocation.rb +66 -9
- data/lib/xero-ruby/models/accounting/allocations.rb +8 -3
- data/lib/xero-ruby/models/accounting/attachment.rb +13 -9
- data/lib/xero-ruby/models/accounting/attachments.rb +8 -3
- data/lib/xero-ruby/models/accounting/balances.rb +9 -3
- data/lib/xero-ruby/models/accounting/bank_transaction.rb +43 -24
- data/lib/xero-ruby/models/accounting/bank_transactions.rb +8 -3
- data/lib/xero-ruby/models/accounting/bank_transfer.rb +20 -14
- data/lib/xero-ruby/models/accounting/bank_transfers.rb +8 -3
- data/lib/xero-ruby/models/accounting/batch_payment.rb +29 -19
- data/lib/xero-ruby/models/accounting/batch_payment_details.rb +11 -7
- data/lib/xero-ruby/models/accounting/batch_payments.rb +8 -3
- data/lib/xero-ruby/models/accounting/bill.rb +8 -3
- data/lib/xero-ruby/models/accounting/branding_theme.rb +13 -8
- data/lib/xero-ruby/models/accounting/branding_themes.rb +8 -3
- data/lib/xero-ruby/models/accounting/cis_org_setting.rb +9 -5
- data/lib/xero-ruby/models/accounting/cis_setting.rb +8 -4
- data/lib/xero-ruby/models/accounting/cis_settings.rb +8 -3
- data/lib/xero-ruby/models/accounting/contact.rb +51 -37
- data/lib/xero-ruby/models/accounting/contact_group.rb +12 -6
- data/lib/xero-ruby/models/accounting/contact_groups.rb +8 -3
- data/lib/xero-ruby/models/accounting/contact_person.rb +10 -6
- data/lib/xero-ruby/models/accounting/contacts.rb +8 -3
- data/lib/xero-ruby/models/accounting/country_code.rb +2 -2
- data/lib/xero-ruby/models/accounting/credit_note.rb +47 -30
- data/lib/xero-ruby/models/accounting/credit_notes.rb +8 -3
- data/lib/xero-ruby/models/accounting/currencies.rb +8 -3
- data/lib/xero-ruby/models/accounting/currency.rb +9 -4
- data/lib/xero-ruby/models/accounting/currency_code.rb +2 -2
- data/lib/xero-ruby/models/accounting/element.rb +14 -4
- data/lib/xero-ruby/models/accounting/employee.rb +17 -8
- data/lib/xero-ruby/models/accounting/employees.rb +8 -3
- data/lib/xero-ruby/models/accounting/error.rb +10 -6
- data/lib/xero-ruby/models/accounting/expense_claim.rb +26 -15
- data/lib/xero-ruby/models/accounting/expense_claims.rb +8 -3
- data/lib/xero-ruby/models/accounting/external_link.rb +14 -4
- data/lib/xero-ruby/models/accounting/history_record.rb +10 -6
- data/lib/xero-ruby/models/accounting/history_records.rb +8 -3
- data/lib/xero-ruby/models/accounting/invoice.rb +69 -46
- data/lib/xero-ruby/models/accounting/invoice_reminder.rb +7 -3
- data/lib/xero-ruby/models/accounting/invoice_reminders.rb +8 -3
- data/lib/xero-ruby/models/accounting/invoices.rb +8 -3
- data/lib/xero-ruby/models/accounting/item.rb +24 -18
- data/lib/xero-ruby/models/accounting/items.rb +8 -3
- data/lib/xero-ruby/models/accounting/journal.rb +39 -10
- data/lib/xero-ruby/models/accounting/journal_line.rb +21 -16
- data/lib/xero-ruby/models/accounting/journals.rb +8 -3
- data/lib/xero-ruby/models/accounting/line_amount_types.rb +2 -2
- data/lib/xero-ruby/models/accounting/line_item.rb +25 -21
- data/lib/xero-ruby/models/accounting/line_item_tracking.rb +10 -6
- data/lib/xero-ruby/models/accounting/linked_transaction.rb +25 -13
- data/lib/xero-ruby/models/accounting/linked_transactions.rb +8 -3
- data/lib/xero-ruby/models/accounting/manual_journal.rb +25 -15
- data/lib/xero-ruby/models/accounting/manual_journal_line.rb +26 -12
- data/lib/xero-ruby/models/accounting/manual_journals.rb +8 -3
- data/lib/xero-ruby/models/accounting/online_invoice.rb +7 -3
- data/lib/xero-ruby/models/accounting/online_invoices.rb +8 -3
- data/lib/xero-ruby/models/accounting/organisation.rb +122 -32
- data/lib/xero-ruby/models/accounting/organisations.rb +8 -3
- data/lib/xero-ruby/models/accounting/overpayment.rb +36 -23
- data/lib/xero-ruby/models/accounting/overpayments.rb +8 -3
- data/lib/xero-ruby/models/accounting/payment.rb +47 -24
- data/lib/xero-ruby/models/accounting/payment_delete.rb +7 -3
- data/lib/xero-ruby/models/accounting/payment_service.rb +12 -8
- data/lib/xero-ruby/models/accounting/payment_services.rb +8 -3
- data/lib/xero-ruby/models/accounting/payment_term.rb +9 -3
- data/lib/xero-ruby/models/accounting/payment_term_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/payments.rb +8 -3
- data/lib/xero-ruby/models/accounting/phone.rb +16 -6
- data/lib/xero-ruby/models/accounting/prepayment.rb +37 -23
- data/lib/xero-ruby/models/accounting/prepayments.rb +8 -3
- data/lib/xero-ruby/models/accounting/purchase.rb +11 -7
- data/lib/xero-ruby/models/accounting/purchase_order.rb +45 -33
- data/lib/xero-ruby/models/accounting/purchase_orders.rb +8 -3
- data/lib/xero-ruby/models/accounting/quote.rb +58 -28
- data/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +2 -2
- data/lib/xero-ruby/models/accounting/quote_status_codes.rb +3 -2
- data/lib/xero-ruby/models/accounting/quotes.rb +8 -3
- data/lib/xero-ruby/models/accounting/receipt.rb +32 -19
- data/lib/xero-ruby/models/accounting/receipts.rb +8 -3
- data/lib/xero-ruby/models/accounting/repeating_invoice.rb +30 -17
- data/lib/xero-ruby/models/accounting/repeating_invoices.rb +8 -3
- data/lib/xero-ruby/models/accounting/report.rb +15 -9
- data/lib/xero-ruby/models/accounting/report_attribute.rb +9 -3
- data/lib/xero-ruby/models/accounting/report_cell.rb +9 -3
- data/lib/xero-ruby/models/accounting/report_fields.rb +10 -3
- data/lib/xero-ruby/models/accounting/report_row.rb +10 -3
- data/lib/xero-ruby/models/accounting/report_rows.rb +11 -3
- data/lib/xero-ruby/models/accounting/report_with_row.rb +15 -9
- data/lib/xero-ruby/models/accounting/report_with_rows.rb +8 -3
- data/lib/xero-ruby/models/accounting/reports.rb +8 -3
- data/lib/xero-ruby/models/accounting/request_empty.rb +7 -3
- data/lib/xero-ruby/models/accounting/row_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/sales_tracking_category.rb +8 -4
- data/lib/xero-ruby/models/accounting/schedule.rb +23 -11
- data/lib/xero-ruby/models/accounting/tax_component.rb +11 -7
- data/lib/xero-ruby/models/accounting/tax_rate.rb +100 -18
- data/lib/xero-ruby/models/accounting/tax_rates.rb +8 -3
- data/lib/xero-ruby/models/accounting/tax_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/{ten_nintey_nine_contact.rb → ten_ninety_nine_contact.rb} +44 -40
- data/lib/xero-ruby/models/accounting/time_zone.rb +2 -2
- data/lib/xero-ruby/models/accounting/tracking_categories.rb +8 -3
- data/lib/xero-ruby/models/accounting/tracking_category.rb +15 -8
- data/lib/xero-ruby/models/accounting/tracking_option.rb +13 -6
- data/lib/xero-ruby/models/accounting/tracking_options.rb +8 -3
- data/lib/xero-ruby/models/accounting/user.rb +20 -9
- data/lib/xero-ruby/models/accounting/users.rb +8 -3
- data/lib/xero-ruby/models/accounting/validation_error.rb +7 -3
- data/lib/xero-ruby/models/assets/asset.rb +24 -17
- 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 +13 -13
- data/lib/xero-ruby/models/assets/assets.rb +9 -3
- data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +19 -15
- data/lib/xero-ruby/models/assets/book_depreciation_setting.rb +26 -11
- data/lib/xero-ruby/models/assets/error.rb +11 -7
- data/lib/xero-ruby/models/assets/field_validation_errors_element.rb +12 -8
- data/lib/xero-ruby/models/assets/pagination.rb +11 -3
- data/lib/xero-ruby/models/assets/resource_validation_errors_element.rb +11 -7
- data/lib/xero-ruby/models/assets/setting.rb +14 -10
- data/lib/xero-ruby/models/projects/amount.rb +218 -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 +218 -0
- data/lib/xero-ruby/models/projects/pagination.rb +238 -0
- data/lib/xero-ruby/models/projects/project.rb +423 -0
- data/lib/xero-ruby/models/projects/project_create_or_update.rb +243 -0
- data/lib/xero-ruby/models/projects/project_patch.rb +213 -0
- data/lib/xero-ruby/models/projects/project_status.rb +37 -0
- data/lib/xero-ruby/models/projects/project_user.rb +228 -0
- data/lib/xero-ruby/models/projects/project_users.rb +220 -0
- data/lib/xero-ruby/models/projects/projects.rb +220 -0
- data/lib/xero-ruby/models/projects/task.rb +385 -0
- data/lib/xero-ruby/models/projects/task_create_or_update.rb +253 -0
- data/lib/xero-ruby/models/projects/tasks.rb +220 -0
- data/lib/xero-ruby/models/projects/time_entries.rb +220 -0
- data/lib/xero-ruby/models/projects/time_entry.rb +324 -0
- data/lib/xero-ruby/models/projects/time_entry_create_or_update.rb +268 -0
- data/lib/xero-ruby/version.rb +3 -3
- data/spec/accounting/api/accounting_api_spec.rb +3 -3
- data/spec/accounting/models/ten_nintey_nine_contact_spec.rb +6 -6
- data/spec/api_client_spec.rb +125 -38
- 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.gemspec +3 -4
- metadata +85 -10
- data/xero-ruby-1.0.gem +0 -0
- data/xero-ruby.gem +0 -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.12
|
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,9 +14,12 @@ require 'time'
|
|
14
14
|
require 'date'
|
15
15
|
|
16
16
|
module XeroRuby::Accounting
|
17
|
+
require 'bigdecimal'
|
18
|
+
|
17
19
|
class PaymentServices
|
18
|
-
attr_accessor :payment_services
|
19
20
|
|
21
|
+
attr_accessor :payment_services
|
22
|
+
|
20
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
24
|
def self.attribute_map
|
22
25
|
{
|
@@ -129,6 +132,8 @@ module XeroRuby::Accounting
|
|
129
132
|
value.to_i
|
130
133
|
when :Float
|
131
134
|
value.to_f
|
135
|
+
when :BigDecimal
|
136
|
+
BigDecimal(value.to_s)
|
132
137
|
when :Boolean
|
133
138
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
134
139
|
true
|
@@ -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.12
|
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,11 +14,15 @@ require 'time'
|
|
14
14
|
require 'date'
|
15
15
|
|
16
16
|
module XeroRuby::Accounting
|
17
|
+
require 'bigdecimal'
|
18
|
+
|
17
19
|
class PaymentTerm
|
20
|
+
|
18
21
|
attr_accessor :bills
|
22
|
+
|
19
23
|
|
20
24
|
attr_accessor :sales
|
21
|
-
|
25
|
+
|
22
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
27
|
def self.attribute_map
|
24
28
|
{
|
@@ -136,6 +140,8 @@ module XeroRuby::Accounting
|
|
136
140
|
value.to_i
|
137
141
|
when :Float
|
138
142
|
value.to_f
|
143
|
+
when :BigDecimal
|
144
|
+
BigDecimal(value.to_s)
|
139
145
|
when :Boolean
|
140
146
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
141
147
|
true
|
@@ -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.12
|
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.12
|
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,9 +14,12 @@ require 'time'
|
|
14
14
|
require 'date'
|
15
15
|
|
16
16
|
module XeroRuby::Accounting
|
17
|
+
require 'bigdecimal'
|
18
|
+
|
17
19
|
class Payments
|
18
|
-
attr_accessor :payments
|
19
20
|
|
21
|
+
attr_accessor :payments
|
22
|
+
|
20
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
24
|
def self.attribute_map
|
22
25
|
{
|
@@ -129,6 +132,8 @@ module XeroRuby::Accounting
|
|
129
132
|
value.to_i
|
130
133
|
when :Float
|
131
134
|
value.to_f
|
135
|
+
when :BigDecimal
|
136
|
+
BigDecimal(value.to_s)
|
132
137
|
when :Boolean
|
133
138
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
134
139
|
true
|
@@ -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.12
|
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,18 +14,26 @@ require 'time'
|
|
14
14
|
require 'date'
|
15
15
|
|
16
16
|
module XeroRuby::Accounting
|
17
|
+
require 'bigdecimal'
|
18
|
+
|
17
19
|
class Phone
|
18
|
-
attr_accessor :phone_type
|
19
20
|
|
21
|
+
attr_accessor :phone_type
|
22
|
+
DEFAULT = "DEFAULT".freeze
|
23
|
+
DDI = "DDI".freeze
|
24
|
+
MOBILE = "MOBILE".freeze
|
25
|
+
FAX = "FAX".freeze
|
26
|
+
OFFICE = "OFFICE".freeze
|
27
|
+
|
20
28
|
# max length = 50
|
21
29
|
attr_accessor :phone_number
|
22
|
-
|
30
|
+
|
23
31
|
# max length = 10
|
24
32
|
attr_accessor :phone_area_code
|
25
|
-
|
33
|
+
|
26
34
|
# max length = 20
|
27
35
|
attr_accessor :phone_country_code
|
28
|
-
|
36
|
+
|
29
37
|
class EnumAttributeValidator
|
30
38
|
attr_reader :datatype
|
31
39
|
attr_reader :allowable_values
|
@@ -236,6 +244,8 @@ module XeroRuby::Accounting
|
|
236
244
|
value.to_i
|
237
245
|
when :Float
|
238
246
|
value.to_f
|
247
|
+
when :BigDecimal
|
248
|
+
BigDecimal(value.to_s)
|
239
249
|
when :Boolean
|
240
250
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
241
251
|
true
|
@@ -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.12
|
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,61 +14,73 @@ require 'time'
|
|
14
14
|
require 'date'
|
15
15
|
|
16
16
|
module XeroRuby::Accounting
|
17
|
+
require 'bigdecimal'
|
18
|
+
|
17
19
|
class Prepayment
|
18
20
|
# See Prepayment Types
|
19
21
|
attr_accessor :type
|
22
|
+
RECEIVE_PREPAYMENT = "RECEIVE-PREPAYMENT".freeze
|
23
|
+
SPEND_PREPAYMENT = "SPEND-PREPAYMENT".freeze
|
24
|
+
ARPREPAYMENT = "ARPREPAYMENT".freeze
|
25
|
+
APPREPAYMENT = "APPREPAYMENT".freeze
|
26
|
+
|
20
27
|
|
21
28
|
attr_accessor :contact
|
22
|
-
|
29
|
+
|
23
30
|
# The date the prepayment is created YYYY-MM-DD
|
24
31
|
attr_accessor :date
|
25
|
-
|
32
|
+
|
26
33
|
# See Prepayment Status Codes
|
27
34
|
attr_accessor :status
|
35
|
+
AUTHORISED = "AUTHORISED".freeze
|
36
|
+
PAID = "PAID".freeze
|
37
|
+
VOIDED = "VOIDED".freeze
|
38
|
+
|
28
39
|
|
29
40
|
attr_accessor :line_amount_types
|
30
|
-
|
41
|
+
|
31
42
|
# See Prepayment Line Items
|
32
43
|
attr_accessor :line_items
|
33
|
-
|
44
|
+
|
34
45
|
# The subtotal of the prepayment excluding taxes
|
35
46
|
attr_accessor :sub_total
|
36
|
-
|
47
|
+
|
37
48
|
# The total tax on the prepayment
|
38
49
|
attr_accessor :total_tax
|
39
|
-
|
50
|
+
|
40
51
|
# The total of the prepayment(subtotal + total tax)
|
41
52
|
attr_accessor :total
|
42
|
-
|
53
|
+
|
43
54
|
# Returns Invoice number field. Reference field isn't available.
|
44
55
|
attr_accessor :reference
|
45
|
-
|
56
|
+
|
46
57
|
# UTC timestamp of last update to the prepayment
|
47
58
|
attr_accessor :updated_date_utc
|
59
|
+
|
48
60
|
|
49
61
|
attr_accessor :currency_code
|
50
|
-
|
62
|
+
|
51
63
|
# Xero generated unique identifier
|
52
64
|
attr_accessor :prepayment_id
|
53
|
-
|
65
|
+
|
54
66
|
# The currency rate for a multicurrency prepayment. If no rate is specified, the XE.com day rate is used
|
55
67
|
attr_accessor :currency_rate
|
56
|
-
|
68
|
+
|
57
69
|
# The remaining credit balance on the prepayment
|
58
70
|
attr_accessor :remaining_credit
|
59
|
-
|
71
|
+
|
60
72
|
# See Allocations
|
61
73
|
attr_accessor :allocations
|
62
|
-
|
74
|
+
|
63
75
|
# The amount of applied to an invoice
|
64
76
|
attr_accessor :applied_amount
|
65
|
-
|
77
|
+
|
66
78
|
# boolean to indicate if a prepayment has an attachment
|
67
79
|
attr_accessor :has_attachments
|
68
|
-
|
80
|
+
|
69
81
|
# See Attachments
|
70
82
|
attr_accessor :attachments
|
71
|
-
|
83
|
+
|
72
84
|
class EnumAttributeValidator
|
73
85
|
attr_reader :datatype
|
74
86
|
attr_reader :allowable_values
|
@@ -125,15 +137,15 @@ module XeroRuby::Accounting
|
|
125
137
|
:'status' => :'String',
|
126
138
|
:'line_amount_types' => :'LineAmountTypes',
|
127
139
|
:'line_items' => :'Array<LineItem>',
|
128
|
-
:'sub_total' => :'
|
129
|
-
:'total_tax' => :'
|
130
|
-
:'total' => :'
|
140
|
+
:'sub_total' => :'BigDecimal',
|
141
|
+
:'total_tax' => :'BigDecimal',
|
142
|
+
:'total' => :'BigDecimal',
|
131
143
|
:'reference' => :'String',
|
132
144
|
:'updated_date_utc' => :'DateTime',
|
133
145
|
:'currency_code' => :'CurrencyCode',
|
134
146
|
:'prepayment_id' => :'String',
|
135
|
-
:'currency_rate' => :'
|
136
|
-
:'remaining_credit' => :'
|
147
|
+
:'currency_rate' => :'BigDecimal',
|
148
|
+
:'remaining_credit' => :'BigDecimal',
|
137
149
|
:'allocations' => :'Array<Allocation>',
|
138
150
|
:'applied_amount' => :'Float',
|
139
151
|
:'has_attachments' => :'Boolean',
|
@@ -359,6 +371,8 @@ module XeroRuby::Accounting
|
|
359
371
|
value.to_i
|
360
372
|
when :Float
|
361
373
|
value.to_f
|
374
|
+
when :BigDecimal
|
375
|
+
BigDecimal(value.to_s)
|
362
376
|
when :Boolean
|
363
377
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
364
378
|
true
|
@@ -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.12
|
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,9 +14,12 @@ require 'time'
|
|
14
14
|
require 'date'
|
15
15
|
|
16
16
|
module XeroRuby::Accounting
|
17
|
+
require 'bigdecimal'
|
18
|
+
|
17
19
|
class Prepayments
|
18
|
-
attr_accessor :prepayments
|
19
20
|
|
21
|
+
attr_accessor :prepayments
|
22
|
+
|
20
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
24
|
def self.attribute_map
|
22
25
|
{
|
@@ -129,6 +132,8 @@ module XeroRuby::Accounting
|
|
129
132
|
value.to_i
|
130
133
|
when :Float
|
131
134
|
value.to_f
|
135
|
+
when :BigDecimal
|
136
|
+
BigDecimal(value.to_s)
|
132
137
|
when :Boolean
|
133
138
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
134
139
|
true
|
@@ -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.12
|
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,19 +14,21 @@ require 'time'
|
|
14
14
|
require 'date'
|
15
15
|
|
16
16
|
module XeroRuby::Accounting
|
17
|
+
require 'bigdecimal'
|
18
|
+
|
17
19
|
class Purchase
|
18
20
|
# Unit Price of the item. By default UnitPrice is rounded to two decimal places. You can use 4 decimal places by adding the unitdp=4 querystring parameter to your request.
|
19
21
|
attr_accessor :unit_price
|
20
|
-
|
22
|
+
|
21
23
|
# Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items
|
22
24
|
attr_accessor :account_code
|
23
|
-
|
25
|
+
|
24
26
|
# Cost of goods sold account. Only applicable to the purchase details of tracked items.
|
25
27
|
attr_accessor :cogs_account_code
|
26
|
-
|
28
|
+
|
27
29
|
# The tax type from TaxRates
|
28
30
|
attr_accessor :tax_type
|
29
|
-
|
31
|
+
|
30
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
33
|
def self.attribute_map
|
32
34
|
{
|
@@ -40,7 +42,7 @@ module XeroRuby::Accounting
|
|
40
42
|
# Attribute type mapping.
|
41
43
|
def self.openapi_types
|
42
44
|
{
|
43
|
-
:'unit_price' => :'
|
45
|
+
:'unit_price' => :'BigDecimal',
|
44
46
|
:'account_code' => :'String',
|
45
47
|
:'cogs_account_code' => :'String',
|
46
48
|
:'tax_type' => :'String'
|
@@ -158,6 +160,8 @@ module XeroRuby::Accounting
|
|
158
160
|
value.to_i
|
159
161
|
when :Float
|
160
162
|
value.to_f
|
163
|
+
when :BigDecimal
|
164
|
+
BigDecimal(value.to_s)
|
161
165
|
when :Boolean
|
162
166
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
163
167
|
true
|
@@ -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.12
|
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,88 +14,98 @@ require 'time'
|
|
14
14
|
require 'date'
|
15
15
|
|
16
16
|
module XeroRuby::Accounting
|
17
|
+
require 'bigdecimal'
|
18
|
+
|
17
19
|
class PurchaseOrder
|
18
|
-
attr_accessor :contact
|
19
20
|
|
21
|
+
attr_accessor :contact
|
22
|
+
|
20
23
|
# See LineItems
|
21
24
|
attr_accessor :line_items
|
22
|
-
|
25
|
+
|
23
26
|
# Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation
|
24
27
|
attr_accessor :date
|
25
|
-
|
28
|
+
|
26
29
|
# Date the goods are to be delivered – YYYY-MM-DD
|
27
30
|
attr_accessor :delivery_date
|
31
|
+
|
28
32
|
|
29
33
|
attr_accessor :line_amount_types
|
30
|
-
|
34
|
+
|
31
35
|
# Unique alpha numeric code identifying purchase order (when missing will auto-generate from your Organisation Invoice Settings)
|
32
36
|
attr_accessor :purchase_order_number
|
33
|
-
|
37
|
+
|
34
38
|
# Additional reference number
|
35
39
|
attr_accessor :reference
|
36
|
-
|
40
|
+
|
37
41
|
# See BrandingThemes
|
38
42
|
attr_accessor :branding_theme_id
|
43
|
+
|
39
44
|
|
40
45
|
attr_accessor :currency_code
|
41
|
-
|
46
|
+
|
42
47
|
# See Purchase Order Status Codes
|
43
48
|
attr_accessor :status
|
44
|
-
|
49
|
+
DRAFT = "DRAFT".freeze
|
50
|
+
SUBMITTED = "SUBMITTED".freeze
|
51
|
+
AUTHORISED = "AUTHORISED".freeze
|
52
|
+
BILLED = "BILLED".freeze
|
53
|
+
DELETED = "DELETED".freeze
|
54
|
+
|
45
55
|
# Boolean to set whether the purchase order should be marked as “sent”. This can be set only on purchase orders that have been approved or billed
|
46
56
|
attr_accessor :sent_to_contact
|
47
|
-
|
57
|
+
|
48
58
|
# The address the goods are to be delivered to
|
49
59
|
attr_accessor :delivery_address
|
50
|
-
|
60
|
+
|
51
61
|
# The person that the delivery is going to
|
52
62
|
attr_accessor :attention_to
|
53
|
-
|
63
|
+
|
54
64
|
# The phone number for the person accepting the delivery
|
55
65
|
attr_accessor :telephone
|
56
|
-
|
66
|
+
|
57
67
|
# A free text feild for instructions (500 characters max)
|
58
68
|
attr_accessor :delivery_instructions
|
59
|
-
|
69
|
+
|
60
70
|
# The date the goods are expected to arrive.
|
61
71
|
attr_accessor :expected_arrival_date
|
62
|
-
|
72
|
+
|
63
73
|
# Xero generated unique identifier for purchase order
|
64
74
|
attr_accessor :purchase_order_id
|
65
|
-
|
75
|
+
|
66
76
|
# The currency rate for a multicurrency purchase order. If no rate is specified, the XE.com day rate is used.
|
67
77
|
attr_accessor :currency_rate
|
68
|
-
|
78
|
+
|
69
79
|
# Total of purchase order excluding taxes
|
70
80
|
attr_accessor :sub_total
|
71
|
-
|
81
|
+
|
72
82
|
# Total tax on purchase order
|
73
83
|
attr_accessor :total_tax
|
74
|
-
|
84
|
+
|
75
85
|
# Total of Purchase Order tax inclusive (i.e. SubTotal + TotalTax)
|
76
86
|
attr_accessor :total
|
77
|
-
|
87
|
+
|
78
88
|
# Total of discounts applied on the purchase order line items
|
79
89
|
attr_accessor :total_discount
|
80
|
-
|
90
|
+
|
81
91
|
# boolean to indicate if a purchase order has an attachment
|
82
92
|
attr_accessor :has_attachments
|
83
|
-
|
93
|
+
|
84
94
|
# Last modified date UTC format
|
85
95
|
attr_accessor :updated_date_utc
|
86
|
-
|
96
|
+
|
87
97
|
# A string to indicate if a invoice status
|
88
98
|
attr_accessor :status_attribute_string
|
89
|
-
|
99
|
+
|
90
100
|
# Displays array of validation error messages from the API
|
91
101
|
attr_accessor :validation_errors
|
92
|
-
|
102
|
+
|
93
103
|
# Displays array of warning messages from the API
|
94
104
|
attr_accessor :warnings
|
95
|
-
|
105
|
+
|
96
106
|
# Displays array of attachments from the API
|
97
107
|
attr_accessor :attachments
|
98
|
-
|
108
|
+
|
99
109
|
class EnumAttributeValidator
|
100
110
|
attr_reader :datatype
|
101
111
|
attr_reader :allowable_values
|
@@ -172,11 +182,11 @@ module XeroRuby::Accounting
|
|
172
182
|
:'delivery_instructions' => :'String',
|
173
183
|
:'expected_arrival_date' => :'Date',
|
174
184
|
:'purchase_order_id' => :'String',
|
175
|
-
:'currency_rate' => :'
|
176
|
-
:'sub_total' => :'
|
177
|
-
:'total_tax' => :'
|
178
|
-
:'total' => :'
|
179
|
-
:'total_discount' => :'
|
185
|
+
:'currency_rate' => :'BigDecimal',
|
186
|
+
:'sub_total' => :'BigDecimal',
|
187
|
+
:'total_tax' => :'BigDecimal',
|
188
|
+
:'total' => :'BigDecimal',
|
189
|
+
:'total_discount' => :'BigDecimal',
|
180
190
|
:'has_attachments' => :'Boolean',
|
181
191
|
:'updated_date_utc' => :'DateTime',
|
182
192
|
:'status_attribute_string' => :'String',
|
@@ -439,6 +449,8 @@ module XeroRuby::Accounting
|
|
439
449
|
value.to_i
|
440
450
|
when :Float
|
441
451
|
value.to_f
|
452
|
+
when :BigDecimal
|
453
|
+
BigDecimal(value.to_s)
|
442
454
|
when :Boolean
|
443
455
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
444
456
|
true
|