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
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
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,118 +14,137 @@ require 'time'
14
14
  require 'date'
15
15
 
16
16
  module XeroRuby::Accounting
17
+ require 'bigdecimal'
18
+
17
19
  class Invoice
18
20
  # See Invoice Types
19
21
  attr_accessor :type
22
+ ACCPAY = "ACCPAY".freeze
23
+ ACCPAYCREDIT = "ACCPAYCREDIT".freeze
24
+ APOVERPAYMENT = "APOVERPAYMENT".freeze
25
+ APPREPAYMENT = "APPREPAYMENT".freeze
26
+ ACCREC = "ACCREC".freeze
27
+ ACCRECCREDIT = "ACCRECCREDIT".freeze
28
+ AROVERPAYMENT = "AROVERPAYMENT".freeze
29
+ ARPREPAYMENT = "ARPREPAYMENT".freeze
30
+
20
31
 
21
32
  attr_accessor :contact
22
-
33
+
23
34
  # See LineItems
24
35
  attr_accessor :line_items
25
-
36
+
26
37
  # Date invoice was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation
27
38
  attr_accessor :date
28
-
39
+
29
40
  # Date invoice is due – YYYY-MM-DD
30
41
  attr_accessor :due_date
42
+
31
43
 
32
44
  attr_accessor :line_amount_types
33
-
45
+
34
46
  # ACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max length = 255)
35
47
  attr_accessor :invoice_number
36
-
48
+
37
49
  # ACCREC only – additional reference number (max length = 255)
38
50
  attr_accessor :reference
39
-
51
+
40
52
  # See BrandingThemes
41
53
  attr_accessor :branding_theme_id
42
-
54
+
43
55
  # URL link to a source document – shown as “Go to [appName]” in the Xero app
44
56
  attr_accessor :url
57
+
45
58
 
46
59
  attr_accessor :currency_code
47
-
60
+
48
61
  # The currency rate for a multicurrency invoice. If no rate is specified, the XE.com day rate is used. (max length = [18].[6])
49
62
  attr_accessor :currency_rate
50
-
63
+
51
64
  # See Invoice Status Codes
52
65
  attr_accessor :status
53
-
66
+ DRAFT = "DRAFT".freeze
67
+ SUBMITTED = "SUBMITTED".freeze
68
+ DELETED = "DELETED".freeze
69
+ AUTHORISED = "AUTHORISED".freeze
70
+ PAID = "PAID".freeze
71
+ VOIDED = "VOIDED".freeze
72
+
54
73
  # Boolean to set whether the invoice in the Xero app should be marked as “sent”. This can be set only on invoices that have been approved
55
74
  attr_accessor :sent_to_contact
56
-
75
+
57
76
  # Shown on sales invoices (Accounts Receivable) when this has been set
58
77
  attr_accessor :expected_payment_date
59
-
78
+
60
79
  # Shown on bills (Accounts Payable) when this has been set
61
80
  attr_accessor :planned_payment_date
62
-
81
+
63
82
  # CIS deduction for UK contractors
64
83
  attr_accessor :cis_deduction
65
-
84
+
66
85
  # Total of invoice excluding taxes
67
86
  attr_accessor :sub_total
68
-
87
+
69
88
  # Total tax on invoice
70
89
  attr_accessor :total_tax
71
-
90
+
72
91
  # Total of Invoice tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn’t equal the sum of the LineAmounts
73
92
  attr_accessor :total
74
-
93
+
75
94
  # Total of discounts applied on the invoice line items
76
95
  attr_accessor :total_discount
77
-
96
+
78
97
  # Xero generated unique identifier for invoice
79
98
  attr_accessor :invoice_id
80
-
99
+
81
100
  # boolean to indicate if an invoice has an attachment
82
101
  attr_accessor :has_attachments
83
-
102
+
84
103
  # boolean to indicate if an invoice has a discount
85
104
  attr_accessor :is_discounted
86
-
105
+
87
106
  # See Payments
88
107
  attr_accessor :payments
89
-
108
+
90
109
  # See Prepayments
91
110
  attr_accessor :prepayments
92
-
111
+
93
112
  # See Overpayments
94
113
  attr_accessor :overpayments
95
-
114
+
96
115
  # Amount remaining to be paid on invoice
97
116
  attr_accessor :amount_due
98
-
117
+
99
118
  # Sum of payments received for invoice
100
119
  attr_accessor :amount_paid
101
-
120
+
102
121
  # The date the invoice was fully paid. Only returned on fully paid invoices
103
122
  attr_accessor :fully_paid_on_date
104
-
123
+
105
124
  # Sum of all credit notes, over-payments and pre-payments applied to invoice
106
125
  attr_accessor :amount_credited
107
-
126
+
108
127
  # Last modified date UTC format
109
128
  attr_accessor :updated_date_utc
110
-
129
+
111
130
  # Details of credit notes that have been applied to an invoice
112
131
  attr_accessor :credit_notes
113
-
132
+
114
133
  # Displays array of attachments from the API
115
134
  attr_accessor :attachments
116
-
135
+
117
136
  # A boolean to indicate if a invoice has an validation errors
118
137
  attr_accessor :has_errors
119
-
138
+
120
139
  # A string to indicate if a invoice status
121
140
  attr_accessor :status_attribute_string
122
-
141
+
123
142
  # Displays array of validation error messages from the API
124
143
  attr_accessor :validation_errors
125
-
144
+
126
145
  # Displays array of warning messages from the API
127
146
  attr_accessor :warnings
128
-
147
+
129
148
  class EnumAttributeValidator
130
149
  attr_reader :datatype
131
150
  attr_reader :allowable_values
@@ -206,26 +225,26 @@ module XeroRuby::Accounting
206
225
  :'branding_theme_id' => :'String',
207
226
  :'url' => :'String',
208
227
  :'currency_code' => :'CurrencyCode',
209
- :'currency_rate' => :'Float',
228
+ :'currency_rate' => :'BigDecimal',
210
229
  :'status' => :'String',
211
230
  :'sent_to_contact' => :'Boolean',
212
231
  :'expected_payment_date' => :'Date',
213
232
  :'planned_payment_date' => :'Date',
214
- :'cis_deduction' => :'Float',
215
- :'sub_total' => :'Float',
216
- :'total_tax' => :'Float',
217
- :'total' => :'Float',
218
- :'total_discount' => :'Float',
233
+ :'cis_deduction' => :'BigDecimal',
234
+ :'sub_total' => :'BigDecimal',
235
+ :'total_tax' => :'BigDecimal',
236
+ :'total' => :'BigDecimal',
237
+ :'total_discount' => :'BigDecimal',
219
238
  :'invoice_id' => :'String',
220
239
  :'has_attachments' => :'Boolean',
221
240
  :'is_discounted' => :'Boolean',
222
241
  :'payments' => :'Array<Payment>',
223
242
  :'prepayments' => :'Array<Prepayment>',
224
243
  :'overpayments' => :'Array<Overpayment>',
225
- :'amount_due' => :'Float',
226
- :'amount_paid' => :'Float',
244
+ :'amount_due' => :'BigDecimal',
245
+ :'amount_paid' => :'BigDecimal',
227
246
  :'fully_paid_on_date' => :'Date',
228
- :'amount_credited' => :'Float',
247
+ :'amount_credited' => :'BigDecimal',
229
248
  :'updated_date_utc' => :'DateTime',
230
249
  :'credit_notes' => :'Array<CreditNote>',
231
250
  :'attachments' => :'Array<Attachment>',
@@ -403,6 +422,8 @@ module XeroRuby::Accounting
403
422
 
404
423
  if attributes.key?(:'has_errors')
405
424
  self.has_errors = attributes[:'has_errors']
425
+ else
426
+ self.has_errors = false
406
427
  end
407
428
 
408
429
  if attributes.key?(:'status_attribute_string')
@@ -589,6 +610,8 @@ module XeroRuby::Accounting
589
610
  value.to_i
590
611
  when :Float
591
612
  value.to_f
613
+ when :BigDecimal
614
+ BigDecimal(value.to_s)
592
615
  when :Boolean
593
616
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
594
617
  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.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,10 +14,12 @@ require 'time'
14
14
  require 'date'
15
15
 
16
16
  module XeroRuby::Accounting
17
+ require 'bigdecimal'
18
+
17
19
  class InvoiceReminder
18
20
  # setting for on or off
19
21
  attr_accessor :enabled
20
-
22
+
21
23
  # Attribute mapping from ruby-style variable name to JSON key.
22
24
  def self.attribute_map
23
25
  {
@@ -128,6 +130,8 @@ module XeroRuby::Accounting
128
130
  value.to_i
129
131
  when :Float
130
132
  value.to_f
133
+ when :BigDecimal
134
+ BigDecimal(value.to_s)
131
135
  when :Boolean
132
136
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
133
137
  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.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,9 +14,12 @@ require 'time'
14
14
  require 'date'
15
15
 
16
16
  module XeroRuby::Accounting
17
+ require 'bigdecimal'
18
+
17
19
  class InvoiceReminders
18
- attr_accessor :invoice_reminders
19
20
 
21
+ attr_accessor :invoice_reminders
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.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,9 +14,12 @@ require 'time'
14
14
  require 'date'
15
15
 
16
16
  module XeroRuby::Accounting
17
+ require 'bigdecimal'
18
+
17
19
  class Invoices
18
- attr_accessor :invoices
19
20
 
21
+ attr_accessor :invoices
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.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,53 +14,57 @@ require 'time'
14
14
  require 'date'
15
15
 
16
16
  module XeroRuby::Accounting
17
+ require 'bigdecimal'
18
+
17
19
  class Item
18
20
  # User defined item code (max length = 30)
19
21
  attr_accessor :code
20
-
22
+
21
23
  # The inventory asset account for the item. The account must be of type INVENTORY. The COGSAccountCode in PurchaseDetails is also required to create a tracked item
22
24
  attr_accessor :inventory_asset_account_code
23
-
25
+
24
26
  # The name of the item (max length = 50)
25
27
  attr_accessor :name
26
-
28
+
27
29
  # Boolean value, defaults to true. When IsSold is true the item will be available on sales transactions in the Xero UI. If IsSold is updated to false then Description and SalesDetails values will be nulled.
28
30
  attr_accessor :is_sold
29
-
31
+
30
32
  # Boolean value, defaults to true. When IsPurchased is true the item is available for purchase transactions in the Xero UI. If IsPurchased is updated to false then PurchaseDescription and PurchaseDetails values will be nulled.
31
33
  attr_accessor :is_purchased
32
-
34
+
33
35
  # The sales description of the item (max length = 4000)
34
36
  attr_accessor :description
35
-
37
+
36
38
  # The purchase description of the item (max length = 4000)
37
39
  attr_accessor :purchase_description
40
+
38
41
 
39
42
  attr_accessor :purchase_details
43
+
40
44
 
41
45
  attr_accessor :sales_details
42
-
46
+
43
47
  # True for items that are tracked as inventory. An item will be tracked as inventory if the InventoryAssetAccountCode and COGSAccountCode are set.
44
48
  attr_accessor :is_tracked_as_inventory
45
-
49
+
46
50
  # The value of the item on hand. Calculated using average cost accounting.
47
51
  attr_accessor :total_cost_pool
48
-
52
+
49
53
  # The quantity of the item on hand
50
54
  attr_accessor :quantity_on_hand
51
-
55
+
52
56
  # Last modified date in UTC format
53
57
  attr_accessor :updated_date_utc
54
-
58
+
55
59
  # The Xero identifier for an Item
56
60
  attr_accessor :item_id
57
-
61
+
58
62
  # Status of object
59
63
  attr_accessor :status_attribute_string
60
-
64
+
61
65
  # Displays array of validation error messages from the API
62
66
  attr_accessor :validation_errors
63
-
67
+
64
68
  # Attribute mapping from ruby-style variable name to JSON key.
65
69
  def self.attribute_map
66
70
  {
@@ -96,8 +100,8 @@ module XeroRuby::Accounting
96
100
  :'purchase_details' => :'Purchase',
97
101
  :'sales_details' => :'Purchase',
98
102
  :'is_tracked_as_inventory' => :'Boolean',
99
- :'total_cost_pool' => :'Float',
100
- :'quantity_on_hand' => :'Float',
103
+ :'total_cost_pool' => :'BigDecimal',
104
+ :'quantity_on_hand' => :'BigDecimal',
101
105
  :'updated_date_utc' => :'DateTime',
102
106
  :'item_id' => :'String',
103
107
  :'status_attribute_string' => :'String',
@@ -347,6 +351,8 @@ module XeroRuby::Accounting
347
351
  value.to_i
348
352
  when :Float
349
353
  value.to_f
354
+ when :BigDecimal
355
+ BigDecimal(value.to_s)
350
356
  when :Boolean
351
357
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
352
358
  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.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,9 +14,12 @@ require 'time'
14
14
  require 'date'
15
15
 
16
16
  module XeroRuby::Accounting
17
+ require 'bigdecimal'
18
+
17
19
  class Items
18
- attr_accessor :items
19
20
 
21
+ attr_accessor :items
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