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.
Files changed (218) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +181 -72
  3. data/build_notes.md +43 -0
  4. data/docs/accounting/AccountingApi.md +1503 -779
  5. data/docs/accounting/Allocation.md +11 -1
  6. data/docs/accounting/Attachment.md +1 -1
  7. data/docs/accounting/BankTransfer.md +1 -1
  8. data/docs/accounting/BatchPayment.md +1 -1
  9. data/docs/accounting/Contact.md +2 -2
  10. data/docs/accounting/CreditNote.md +2 -2
  11. data/docs/accounting/Invoice.md +2 -2
  12. data/docs/accounting/ManualJournalLine.md +2 -0
  13. data/docs/accounting/Organisation.md +3 -1
  14. data/docs/accounting/Payment.md +4 -4
  15. data/docs/accounting/Quote.md +5 -1
  16. data/docs/accounting/Report.md +1 -1
  17. data/docs/accounting/{TenNinteyNineContact.md → TenNinetyNineContact.md} +2 -2
  18. data/docs/assets/AssetApi.md +40 -16
  19. data/docs/assets/AssetType.md +1 -1
  20. data/docs/projects/Amount.md +19 -0
  21. data/docs/projects/ChargeType.md +16 -0
  22. data/docs/projects/CurrencyCode.md +16 -0
  23. data/docs/projects/Error.md +19 -0
  24. data/docs/projects/Pagination.md +23 -0
  25. data/docs/projects/Project.md +59 -0
  26. data/docs/projects/ProjectApi.md +979 -0
  27. data/docs/projects/ProjectCreateOrUpdate.md +23 -0
  28. data/docs/projects/ProjectPatch.md +17 -0
  29. data/docs/projects/ProjectStatus.md +16 -0
  30. data/docs/projects/ProjectUser.md +21 -0
  31. data/docs/projects/ProjectUsers.md +19 -0
  32. data/docs/projects/Projects.md +19 -0
  33. data/docs/projects/Task.md +45 -0
  34. data/docs/projects/TaskCreateOrUpdate.md +23 -0
  35. data/docs/projects/Tasks.md +19 -0
  36. data/docs/projects/TimeEntries.md +19 -0
  37. data/docs/projects/TimeEntry.md +33 -0
  38. data/docs/projects/TimeEntryCreateOrUpdate.md +25 -0
  39. data/lib/xero-ruby.rb +22 -3
  40. data/lib/xero-ruby/api/accounting_api.rb +1368 -72
  41. data/lib/xero-ruby/api/asset_api.rb +39 -3
  42. data/lib/xero-ruby/api/project_api.rb +1113 -0
  43. data/lib/xero-ruby/api_client.rb +104 -38
  44. data/lib/xero-ruby/api_error.rb +2 -2
  45. data/lib/xero-ruby/configuration.rb +4 -5
  46. data/lib/xero-ruby/models/accounting/account.rb +61 -20
  47. data/lib/xero-ruby/models/accounting/account_type.rb +2 -2
  48. data/lib/xero-ruby/models/accounting/accounts.rb +8 -3
  49. data/lib/xero-ruby/models/accounting/accounts_payable.rb +11 -5
  50. data/lib/xero-ruby/models/accounting/accounts_receivable.rb +11 -5
  51. data/lib/xero-ruby/models/accounting/address.rb +19 -12
  52. data/lib/xero-ruby/models/accounting/allocation.rb +66 -9
  53. data/lib/xero-ruby/models/accounting/allocations.rb +8 -3
  54. data/lib/xero-ruby/models/accounting/attachment.rb +13 -9
  55. data/lib/xero-ruby/models/accounting/attachments.rb +8 -3
  56. data/lib/xero-ruby/models/accounting/balances.rb +9 -3
  57. data/lib/xero-ruby/models/accounting/bank_transaction.rb +43 -24
  58. data/lib/xero-ruby/models/accounting/bank_transactions.rb +8 -3
  59. data/lib/xero-ruby/models/accounting/bank_transfer.rb +20 -14
  60. data/lib/xero-ruby/models/accounting/bank_transfers.rb +8 -3
  61. data/lib/xero-ruby/models/accounting/batch_payment.rb +29 -19
  62. data/lib/xero-ruby/models/accounting/batch_payment_details.rb +11 -7
  63. data/lib/xero-ruby/models/accounting/batch_payments.rb +8 -3
  64. data/lib/xero-ruby/models/accounting/bill.rb +8 -3
  65. data/lib/xero-ruby/models/accounting/branding_theme.rb +13 -8
  66. data/lib/xero-ruby/models/accounting/branding_themes.rb +8 -3
  67. data/lib/xero-ruby/models/accounting/cis_org_setting.rb +9 -5
  68. data/lib/xero-ruby/models/accounting/cis_setting.rb +8 -4
  69. data/lib/xero-ruby/models/accounting/cis_settings.rb +8 -3
  70. data/lib/xero-ruby/models/accounting/contact.rb +51 -37
  71. data/lib/xero-ruby/models/accounting/contact_group.rb +12 -6
  72. data/lib/xero-ruby/models/accounting/contact_groups.rb +8 -3
  73. data/lib/xero-ruby/models/accounting/contact_person.rb +10 -6
  74. data/lib/xero-ruby/models/accounting/contacts.rb +8 -3
  75. data/lib/xero-ruby/models/accounting/country_code.rb +2 -2
  76. data/lib/xero-ruby/models/accounting/credit_note.rb +47 -30
  77. data/lib/xero-ruby/models/accounting/credit_notes.rb +8 -3
  78. data/lib/xero-ruby/models/accounting/currencies.rb +8 -3
  79. data/lib/xero-ruby/models/accounting/currency.rb +9 -4
  80. data/lib/xero-ruby/models/accounting/currency_code.rb +2 -2
  81. data/lib/xero-ruby/models/accounting/element.rb +14 -4
  82. data/lib/xero-ruby/models/accounting/employee.rb +17 -8
  83. data/lib/xero-ruby/models/accounting/employees.rb +8 -3
  84. data/lib/xero-ruby/models/accounting/error.rb +10 -6
  85. data/lib/xero-ruby/models/accounting/expense_claim.rb +26 -15
  86. data/lib/xero-ruby/models/accounting/expense_claims.rb +8 -3
  87. data/lib/xero-ruby/models/accounting/external_link.rb +14 -4
  88. data/lib/xero-ruby/models/accounting/history_record.rb +10 -6
  89. data/lib/xero-ruby/models/accounting/history_records.rb +8 -3
  90. data/lib/xero-ruby/models/accounting/invoice.rb +69 -46
  91. data/lib/xero-ruby/models/accounting/invoice_reminder.rb +7 -3
  92. data/lib/xero-ruby/models/accounting/invoice_reminders.rb +8 -3
  93. data/lib/xero-ruby/models/accounting/invoices.rb +8 -3
  94. data/lib/xero-ruby/models/accounting/item.rb +24 -18
  95. data/lib/xero-ruby/models/accounting/items.rb +8 -3
  96. data/lib/xero-ruby/models/accounting/journal.rb +39 -10
  97. data/lib/xero-ruby/models/accounting/journal_line.rb +21 -16
  98. data/lib/xero-ruby/models/accounting/journals.rb +8 -3
  99. data/lib/xero-ruby/models/accounting/line_amount_types.rb +2 -2
  100. data/lib/xero-ruby/models/accounting/line_item.rb +25 -21
  101. data/lib/xero-ruby/models/accounting/line_item_tracking.rb +10 -6
  102. data/lib/xero-ruby/models/accounting/linked_transaction.rb +25 -13
  103. data/lib/xero-ruby/models/accounting/linked_transactions.rb +8 -3
  104. data/lib/xero-ruby/models/accounting/manual_journal.rb +25 -15
  105. data/lib/xero-ruby/models/accounting/manual_journal_line.rb +26 -12
  106. data/lib/xero-ruby/models/accounting/manual_journals.rb +8 -3
  107. data/lib/xero-ruby/models/accounting/online_invoice.rb +7 -3
  108. data/lib/xero-ruby/models/accounting/online_invoices.rb +8 -3
  109. data/lib/xero-ruby/models/accounting/organisation.rb +122 -32
  110. data/lib/xero-ruby/models/accounting/organisations.rb +8 -3
  111. data/lib/xero-ruby/models/accounting/overpayment.rb +36 -23
  112. data/lib/xero-ruby/models/accounting/overpayments.rb +8 -3
  113. data/lib/xero-ruby/models/accounting/payment.rb +47 -24
  114. data/lib/xero-ruby/models/accounting/payment_delete.rb +7 -3
  115. data/lib/xero-ruby/models/accounting/payment_service.rb +12 -8
  116. data/lib/xero-ruby/models/accounting/payment_services.rb +8 -3
  117. data/lib/xero-ruby/models/accounting/payment_term.rb +9 -3
  118. data/lib/xero-ruby/models/accounting/payment_term_type.rb +2 -2
  119. data/lib/xero-ruby/models/accounting/payments.rb +8 -3
  120. data/lib/xero-ruby/models/accounting/phone.rb +16 -6
  121. data/lib/xero-ruby/models/accounting/prepayment.rb +37 -23
  122. data/lib/xero-ruby/models/accounting/prepayments.rb +8 -3
  123. data/lib/xero-ruby/models/accounting/purchase.rb +11 -7
  124. data/lib/xero-ruby/models/accounting/purchase_order.rb +45 -33
  125. data/lib/xero-ruby/models/accounting/purchase_orders.rb +8 -3
  126. data/lib/xero-ruby/models/accounting/quote.rb +58 -28
  127. data/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +2 -2
  128. data/lib/xero-ruby/models/accounting/quote_status_codes.rb +3 -2
  129. data/lib/xero-ruby/models/accounting/quotes.rb +8 -3
  130. data/lib/xero-ruby/models/accounting/receipt.rb +32 -19
  131. data/lib/xero-ruby/models/accounting/receipts.rb +8 -3
  132. data/lib/xero-ruby/models/accounting/repeating_invoice.rb +30 -17
  133. data/lib/xero-ruby/models/accounting/repeating_invoices.rb +8 -3
  134. data/lib/xero-ruby/models/accounting/report.rb +15 -9
  135. data/lib/xero-ruby/models/accounting/report_attribute.rb +9 -3
  136. data/lib/xero-ruby/models/accounting/report_cell.rb +9 -3
  137. data/lib/xero-ruby/models/accounting/report_fields.rb +10 -3
  138. data/lib/xero-ruby/models/accounting/report_row.rb +10 -3
  139. data/lib/xero-ruby/models/accounting/report_rows.rb +11 -3
  140. data/lib/xero-ruby/models/accounting/report_with_row.rb +15 -9
  141. data/lib/xero-ruby/models/accounting/report_with_rows.rb +8 -3
  142. data/lib/xero-ruby/models/accounting/reports.rb +8 -3
  143. data/lib/xero-ruby/models/accounting/request_empty.rb +7 -3
  144. data/lib/xero-ruby/models/accounting/row_type.rb +2 -2
  145. data/lib/xero-ruby/models/accounting/sales_tracking_category.rb +8 -4
  146. data/lib/xero-ruby/models/accounting/schedule.rb +23 -11
  147. data/lib/xero-ruby/models/accounting/tax_component.rb +11 -7
  148. data/lib/xero-ruby/models/accounting/tax_rate.rb +100 -18
  149. data/lib/xero-ruby/models/accounting/tax_rates.rb +8 -3
  150. data/lib/xero-ruby/models/accounting/tax_type.rb +2 -2
  151. data/lib/xero-ruby/models/accounting/{ten_nintey_nine_contact.rb → ten_ninety_nine_contact.rb} +44 -40
  152. data/lib/xero-ruby/models/accounting/time_zone.rb +2 -2
  153. data/lib/xero-ruby/models/accounting/tracking_categories.rb +8 -3
  154. data/lib/xero-ruby/models/accounting/tracking_category.rb +15 -8
  155. data/lib/xero-ruby/models/accounting/tracking_option.rb +13 -6
  156. data/lib/xero-ruby/models/accounting/tracking_options.rb +8 -3
  157. data/lib/xero-ruby/models/accounting/user.rb +20 -9
  158. data/lib/xero-ruby/models/accounting/users.rb +8 -3
  159. data/lib/xero-ruby/models/accounting/validation_error.rb +7 -3
  160. data/lib/xero-ruby/models/assets/asset.rb +24 -17
  161. data/lib/xero-ruby/models/assets/asset_status.rb +2 -2
  162. data/lib/xero-ruby/models/assets/asset_status_query_param.rb +2 -2
  163. data/lib/xero-ruby/models/assets/asset_type.rb +13 -13
  164. data/lib/xero-ruby/models/assets/assets.rb +9 -3
  165. data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +19 -15
  166. data/lib/xero-ruby/models/assets/book_depreciation_setting.rb +26 -11
  167. data/lib/xero-ruby/models/assets/error.rb +11 -7
  168. data/lib/xero-ruby/models/assets/field_validation_errors_element.rb +12 -8
  169. data/lib/xero-ruby/models/assets/pagination.rb +11 -3
  170. data/lib/xero-ruby/models/assets/resource_validation_errors_element.rb +11 -7
  171. data/lib/xero-ruby/models/assets/setting.rb +14 -10
  172. data/lib/xero-ruby/models/projects/amount.rb +218 -0
  173. data/lib/xero-ruby/models/projects/charge_type.rb +38 -0
  174. data/lib/xero-ruby/models/projects/currency_code.rb +199 -0
  175. data/lib/xero-ruby/models/projects/error.rb +218 -0
  176. data/lib/xero-ruby/models/projects/pagination.rb +238 -0
  177. data/lib/xero-ruby/models/projects/project.rb +423 -0
  178. data/lib/xero-ruby/models/projects/project_create_or_update.rb +243 -0
  179. data/lib/xero-ruby/models/projects/project_patch.rb +213 -0
  180. data/lib/xero-ruby/models/projects/project_status.rb +37 -0
  181. data/lib/xero-ruby/models/projects/project_user.rb +228 -0
  182. data/lib/xero-ruby/models/projects/project_users.rb +220 -0
  183. data/lib/xero-ruby/models/projects/projects.rb +220 -0
  184. data/lib/xero-ruby/models/projects/task.rb +385 -0
  185. data/lib/xero-ruby/models/projects/task_create_or_update.rb +253 -0
  186. data/lib/xero-ruby/models/projects/tasks.rb +220 -0
  187. data/lib/xero-ruby/models/projects/time_entries.rb +220 -0
  188. data/lib/xero-ruby/models/projects/time_entry.rb +324 -0
  189. data/lib/xero-ruby/models/projects/time_entry_create_or_update.rb +268 -0
  190. data/lib/xero-ruby/version.rb +3 -3
  191. data/spec/accounting/api/accounting_api_spec.rb +3 -3
  192. data/spec/accounting/models/ten_nintey_nine_contact_spec.rb +6 -6
  193. data/spec/api_client_spec.rb +125 -38
  194. data/spec/assets/api/asset_api_spec.rb +3 -3
  195. data/spec/configuration_spec.rb +7 -23
  196. data/spec/projects/api/project_api_spec.rb +229 -0
  197. data/spec/projects/models/amount_spec.rb +47 -0
  198. data/spec/projects/models/charge_type_spec.rb +35 -0
  199. data/spec/projects/models/currency_code_spec.rb +35 -0
  200. data/spec/projects/models/error_spec.rb +47 -0
  201. data/spec/projects/models/pagination_spec.rb +59 -0
  202. data/spec/projects/models/project_create_or_update_spec.rb +59 -0
  203. data/spec/projects/models/project_patch_spec.rb +41 -0
  204. data/spec/projects/models/project_spec.rb +167 -0
  205. data/spec/projects/models/project_status_spec.rb +35 -0
  206. data/spec/projects/models/project_user_spec.rb +53 -0
  207. data/spec/projects/models/project_users_spec.rb +47 -0
  208. data/spec/projects/models/projects_spec.rb +47 -0
  209. data/spec/projects/models/task_create_or_update_spec.rb +59 -0
  210. data/spec/projects/models/task_spec.rb +129 -0
  211. data/spec/projects/models/tasks_spec.rb +47 -0
  212. data/spec/projects/models/time_entries_spec.rb +47 -0
  213. data/spec/projects/models/time_entry_create_or_update_spec.rb +65 -0
  214. data/spec/projects/models/time_entry_spec.rb +93 -0
  215. data/xero-ruby.gemspec +3 -4
  216. metadata +85 -10
  217. data/xero-ruby-1.0.gem +0 -0
  218. data/xero-ruby.gem +0 -0
@@ -3,10 +3,10 @@
3
3
 
4
4
  #This is the Xero Assets API
5
5
 
6
- The version of the OpenAPI document: 2.1.3
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.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #This is the Xero Assets API
5
5
 
6
- The version of the OpenAPI document: 2.1.3
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.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -14,27 +14,30 @@ require 'time'
14
14
  require 'date'
15
15
 
16
16
  module XeroRuby::Assets
17
+ require 'bigdecimal'
18
+
17
19
  class AssetType
18
20
  # Xero generated unique identifier for asset types
19
21
  attr_accessor :asset_type_id
20
-
22
+
21
23
  # The name of the asset type
22
24
  attr_accessor :asset_type_name
23
-
25
+
24
26
  # The asset account for fixed assets of this type
25
27
  attr_accessor :fixed_asset_account_id
26
-
28
+
27
29
  # The expense account for the depreciation of fixed assets of this type
28
30
  attr_accessor :depreciation_expense_account_id
29
-
31
+
30
32
  # The account for accumulated depreciation of fixed assets of this type
31
33
  attr_accessor :accumulated_depreciation_account_id
34
+
32
35
 
33
36
  attr_accessor :book_depreciation_setting
34
-
37
+
35
38
  # All asset types that have accumulated depreciation for any assets that use them are deemed ‘locked’ and cannot be removed.
36
39
  attr_accessor :locks
37
-
40
+
38
41
  # Attribute mapping from ruby-style variable name to JSON key.
39
42
  def self.attribute_map
40
43
  {
@@ -109,10 +112,6 @@ module XeroRuby::Assets
109
112
  # @return Array for valid properties with the reasons
110
113
  def list_invalid_properties
111
114
  invalid_properties = Array.new
112
- if @asset_type_id.nil?
113
- invalid_properties.push('invalid value for "asset_type_id", asset_type_id cannot be nil.')
114
- end
115
-
116
115
  if @asset_type_name.nil?
117
116
  invalid_properties.push('invalid value for "asset_type_name", asset_type_name cannot be nil.')
118
117
  end
@@ -127,7 +126,6 @@ module XeroRuby::Assets
127
126
  # Check to see if the all the properties in the model are valid
128
127
  # @return true if the model is valid
129
128
  def valid?
130
- return false if @asset_type_id.nil?
131
129
  return false if @asset_type_name.nil?
132
130
  return false if @book_depreciation_setting.nil?
133
131
  true
@@ -202,6 +200,8 @@ module XeroRuby::Assets
202
200
  value.to_i
203
201
  when :Float
204
202
  value.to_f
203
+ when :BigDecimal
204
+ BigDecimal(value.to_s)
205
205
  when :Boolean
206
206
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
207
207
  true
@@ -3,10 +3,10 @@
3
3
 
4
4
  #This is the Xero Assets API
5
5
 
6
- The version of the OpenAPI document: 2.1.3
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.0
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::Assets
17
+ require 'bigdecimal'
18
+
17
19
  class Assets
20
+
18
21
  attr_accessor :pagination
22
+
19
23
 
20
24
  attr_accessor :items
21
-
25
+
22
26
  # Attribute mapping from ruby-style variable name to JSON key.
23
27
  def self.attribute_map
24
28
  {
@@ -138,6 +142,8 @@ module XeroRuby::Assets
138
142
  value.to_i
139
143
  when :Float
140
144
  value.to_f
145
+ when :BigDecimal
146
+ BigDecimal(value.to_s)
141
147
  when :Boolean
142
148
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
149
  true
@@ -3,10 +3,10 @@
3
3
 
4
4
  #This is the Xero Assets API
5
5
 
6
- The version of the OpenAPI document: 2.1.3
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.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -14,28 +14,30 @@ require 'time'
14
14
  require 'date'
15
15
 
16
16
  module XeroRuby::Assets
17
+ require 'bigdecimal'
18
+
17
19
  class BookDepreciationDetail
18
20
  # When an asset is disposed, this will be the sell price minus the purchase price if a profit was made.
19
21
  attr_accessor :current_capital_gain
20
-
22
+
21
23
  # When an asset is disposed, this will be the lowest one of sell price or purchase price, minus the current book value.
22
24
  attr_accessor :current_gain_loss
23
-
25
+
24
26
  # YYYY-MM-DD
25
27
  attr_accessor :depreciation_start_date
26
-
28
+
27
29
  # The value of the asset you want to depreciate, if this is less than the cost of the asset.
28
30
  attr_accessor :cost_limit
29
-
31
+
30
32
  # The value of the asset remaining when you've fully depreciated it.
31
33
  attr_accessor :residual_value
32
-
34
+
33
35
  # All depreciation prior to the current financial year.
34
36
  attr_accessor :prior_accum_depreciation_amount
35
-
37
+
36
38
  # All depreciation occurring in the current financial year.
37
39
  attr_accessor :current_accum_depreciation_amount
38
-
40
+
39
41
  # Attribute mapping from ruby-style variable name to JSON key.
40
42
  def self.attribute_map
41
43
  {
@@ -52,13 +54,13 @@ module XeroRuby::Assets
52
54
  # Attribute type mapping.
53
55
  def self.openapi_types
54
56
  {
55
- :'current_capital_gain' => :'Float',
56
- :'current_gain_loss' => :'Float',
57
+ :'current_capital_gain' => :'BigDecimal',
58
+ :'current_gain_loss' => :'BigDecimal',
57
59
  :'depreciation_start_date' => :'Date',
58
- :'cost_limit' => :'Float',
59
- :'residual_value' => :'Float',
60
- :'prior_accum_depreciation_amount' => :'Float',
61
- :'current_accum_depreciation_amount' => :'Float'
60
+ :'cost_limit' => :'BigDecimal',
61
+ :'residual_value' => :'BigDecimal',
62
+ :'prior_accum_depreciation_amount' => :'BigDecimal',
63
+ :'current_accum_depreciation_amount' => :'BigDecimal'
62
64
  }
63
65
  end
64
66
 
@@ -188,6 +190,8 @@ module XeroRuby::Assets
188
190
  value.to_i
189
191
  when :Float
190
192
  value.to_f
193
+ when :BigDecimal
194
+ BigDecimal(value.to_s)
191
195
  when :Boolean
192
196
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
193
197
  true
@@ -3,10 +3,10 @@
3
3
 
4
4
  #This is the Xero Assets API
5
5
 
6
- The version of the OpenAPI document: 2.1.3
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.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -14,31 +14,44 @@ require 'time'
14
14
  require 'date'
15
15
 
16
16
  module XeroRuby::Assets
17
+ require 'bigdecimal'
18
+
17
19
  class BookDepreciationSetting
18
20
  # The method of depreciation applied to this asset. See Depreciation Methods
19
21
  attr_accessor :depreciation_method
20
-
22
+ NO_DEPRECIATION = "NoDepreciation".freeze
23
+ STRAIGHT_LINE = "StraightLine".freeze
24
+ DIMINISHING_VALUE100 = "DiminishingValue100".freeze
25
+ DIMINISHING_VALUE150 = "DiminishingValue150".freeze
26
+ DIMINISHING_VALUE200 = "DiminishingValue200".freeze
27
+ FULL_DEPRECIATION = "FullDepreciation".freeze
28
+
21
29
  # The method of averaging applied to this asset. See Averaging Methods
22
30
  attr_accessor :averaging_method
23
-
31
+ FULL_MONTH = "FullMonth".freeze
32
+ ACTUAL_DAYS = "ActualDays".freeze
33
+
24
34
  # The rate of depreciation (e.g. 0.05)
25
35
  attr_accessor :depreciation_rate
26
-
36
+
27
37
  # Effective life of the asset in years (e.g. 5)
28
38
  attr_accessor :effective_life_years
29
-
39
+
30
40
  # See Depreciation Calculation Methods
31
41
  attr_accessor :depreciation_calculation_method
32
-
42
+ RATE = "Rate".freeze
43
+ LIFE = "Life".freeze
44
+ NONE = "None".freeze
45
+
33
46
  # Unique Xero identifier for the depreciable object
34
47
  attr_accessor :depreciable_object_id
35
-
48
+
36
49
  # The type of asset object
37
50
  attr_accessor :depreciable_object_type
38
-
51
+
39
52
  # Unique Xero identifier for the effective date change
40
53
  attr_accessor :book_effective_date_of_change_id
41
-
54
+
42
55
  class EnumAttributeValidator
43
56
  attr_reader :datatype
44
57
  attr_reader :allowable_values
@@ -80,7 +93,7 @@ module XeroRuby::Assets
80
93
  {
81
94
  :'depreciation_method' => :'String',
82
95
  :'averaging_method' => :'String',
83
- :'depreciation_rate' => :'Float',
96
+ :'depreciation_rate' => :'BigDecimal',
84
97
  :'effective_life_years' => :'Integer',
85
98
  :'depreciation_calculation_method' => :'String',
86
99
  :'depreciable_object_id' => :'String',
@@ -256,6 +269,8 @@ module XeroRuby::Assets
256
269
  value.to_i
257
270
  when :Float
258
271
  value.to_f
272
+ when :BigDecimal
273
+ BigDecimal(value.to_s)
259
274
  when :Boolean
260
275
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
261
276
  true
@@ -3,10 +3,10 @@
3
3
 
4
4
  #This is the Xero Assets API
5
5
 
6
- The version of the OpenAPI document: 2.1.3
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.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -14,22 +14,24 @@ require 'time'
14
14
  require 'date'
15
15
 
16
16
  module XeroRuby::Assets
17
+ require 'bigdecimal'
18
+
17
19
  class Error
18
20
  # Array of elements of resource validation errors
19
21
  attr_accessor :resource_validation_errors
20
-
22
+
21
23
  # Array of elements of field validation errors
22
24
  attr_accessor :field_validation_errors
23
-
25
+
24
26
  # The internal type of error, not accessible externally
25
27
  attr_accessor :type
26
-
28
+
27
29
  # Title of the error
28
30
  attr_accessor :title
29
-
31
+
30
32
  # Detail of the error
31
33
  attr_accessor :detail
32
-
34
+
33
35
  # Attribute mapping from ruby-style variable name to JSON key.
34
36
  def self.attribute_map
35
37
  {
@@ -172,6 +174,8 @@ module XeroRuby::Assets
172
174
  value.to_i
173
175
  when :Float
174
176
  value.to_f
177
+ when :BigDecimal
178
+ BigDecimal(value.to_s)
175
179
  when :Boolean
176
180
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
177
181
  true
@@ -3,10 +3,10 @@
3
3
 
4
4
  #This is the Xero Assets API
5
5
 
6
- The version of the OpenAPI document: 2.1.3
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.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -14,25 +14,27 @@ require 'time'
14
14
  require 'date'
15
15
 
16
16
  module XeroRuby::Assets
17
+ require 'bigdecimal'
18
+
17
19
  class FieldValidationErrorsElement
18
20
  # The field name of the erroneous field
19
21
  attr_accessor :field_name
20
-
22
+
21
23
  # The provided value
22
24
  attr_accessor :value_provided
23
-
25
+
24
26
  # Explaination of the field validation error
25
27
  attr_accessor :localised_message
26
-
28
+
27
29
  # Internal type of the field validation error message
28
30
  attr_accessor :type
29
-
31
+
30
32
  # Title of the field validation error
31
33
  attr_accessor :title
32
-
34
+
33
35
  # Detail of the field validation error
34
36
  attr_accessor :detail
35
-
37
+
36
38
  # Attribute mapping from ruby-style variable name to JSON key.
37
39
  def self.attribute_map
38
40
  {
@@ -178,6 +180,8 @@ module XeroRuby::Assets
178
180
  value.to_i
179
181
  when :Float
180
182
  value.to_f
183
+ when :BigDecimal
184
+ BigDecimal(value.to_s)
181
185
  when :Boolean
182
186
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
183
187
  true
@@ -3,10 +3,10 @@
3
3
 
4
4
  #This is the Xero Assets API
5
5
 
6
- The version of the OpenAPI document: 2.1.3
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.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -14,15 +14,21 @@ require 'time'
14
14
  require 'date'
15
15
 
16
16
  module XeroRuby::Assets
17
+ require 'bigdecimal'
18
+
17
19
  class Pagination
20
+
18
21
  attr_accessor :page
22
+
19
23
 
20
24
  attr_accessor :page_size
25
+
21
26
 
22
27
  attr_accessor :page_count
28
+
23
29
 
24
30
  attr_accessor :item_count
25
-
31
+
26
32
  # Attribute mapping from ruby-style variable name to JSON key.
27
33
  def self.attribute_map
28
34
  {
@@ -154,6 +160,8 @@ module XeroRuby::Assets
154
160
  value.to_i
155
161
  when :Float
156
162
  value.to_f
163
+ when :BigDecimal
164
+ BigDecimal(value.to_s)
157
165
  when :Boolean
158
166
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
167
  true
@@ -3,10 +3,10 @@
3
3
 
4
4
  #This is the Xero Assets API
5
5
 
6
- The version of the OpenAPI document: 2.1.3
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.0
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -14,22 +14,24 @@ require 'time'
14
14
  require 'date'
15
15
 
16
16
  module XeroRuby::Assets
17
+ require 'bigdecimal'
18
+
17
19
  class ResourceValidationErrorsElement
18
20
  # The field name of the erroneous field
19
21
  attr_accessor :resource_name
20
-
22
+
21
23
  # Explaination of the resource validation error
22
24
  attr_accessor :localised_message
23
-
25
+
24
26
  # Internal type of the resource error message
25
27
  attr_accessor :type
26
-
28
+
27
29
  # Title of the resource validation error
28
30
  attr_accessor :title
29
-
31
+
30
32
  # Detail of the resource validation error
31
33
  attr_accessor :detail
32
-
34
+
33
35
  # Attribute mapping from ruby-style variable name to JSON key.
34
36
  def self.attribute_map
35
37
  {
@@ -168,6 +170,8 @@ module XeroRuby::Assets
168
170
  value.to_i
169
171
  when :Float
170
172
  value.to_f
173
+ when :BigDecimal
174
+ BigDecimal(value.to_s)
171
175
  when :Boolean
172
176
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
173
177
  true