xero-ruby 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (269) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +44 -35
  3. data/docs/Account.md +3 -1
  4. data/docs/AccountingApi.md +2667 -2323
  5. data/docs/Attachment.md +2 -2
  6. data/docs/BankTransaction.md +3 -3
  7. data/docs/BrandingTheme.md +4 -0
  8. data/docs/Contact.md +3 -1
  9. data/docs/CreditNote.md +2 -0
  10. data/docs/Element.md +15 -1
  11. data/docs/Employee.md +5 -1
  12. data/docs/Invoice.md +6 -4
  13. data/docs/Item.md +3 -1
  14. data/docs/LineItem.md +4 -4
  15. data/docs/LineItemTracking.md +3 -1
  16. data/docs/LinkedTransaction.md +2 -2
  17. data/docs/ManualJournal.md +3 -1
  18. data/docs/Prepayment.md +2 -0
  19. data/docs/PurchaseOrder.md +3 -3
  20. data/docs/Quote.md +59 -0
  21. data/docs/QuoteLineAmountTypes.md +16 -0
  22. data/docs/QuoteStatusCodes.md +16 -0
  23. data/docs/Quotes.md +17 -0
  24. data/docs/Receipt.md +6 -4
  25. data/docs/ReportWithRow.md +2 -2
  26. data/docs/TaxRate.md +1 -1
  27. data/git_push.sh +1 -1
  28. data/lib/.DS_Store +0 -0
  29. data/lib/xero-ruby/api/accounting_api.rb +1741 -1334
  30. data/lib/xero-ruby/api_client.rb +2 -2
  31. data/lib/xero-ruby/api_error.rb +2 -2
  32. data/lib/xero-ruby/configuration.rb +3 -7
  33. data/lib/xero-ruby/models/account.rb +15 -5
  34. data/lib/xero-ruby/models/account_type.rb +2 -2
  35. data/lib/xero-ruby/models/accounts.rb +2 -2
  36. data/lib/xero-ruby/models/accounts_payable.rb +2 -2
  37. data/lib/xero-ruby/models/accounts_receivable.rb +2 -2
  38. data/lib/xero-ruby/models/address.rb +2 -2
  39. data/lib/xero-ruby/models/allocation.rb +2 -2
  40. data/lib/xero-ruby/models/allocations.rb +2 -2
  41. data/lib/xero-ruby/models/attachment.rb +2 -2
  42. data/lib/xero-ruby/models/attachments.rb +2 -2
  43. data/lib/xero-ruby/models/balances.rb +2 -2
  44. data/lib/xero-ruby/models/bank_transaction.rb +2 -2
  45. data/lib/xero-ruby/models/bank_transactions.rb +2 -2
  46. data/lib/xero-ruby/models/bank_transfer.rb +2 -2
  47. data/lib/xero-ruby/models/bank_transfers.rb +2 -2
  48. data/lib/xero-ruby/models/batch_payment.rb +48 -2
  49. data/lib/xero-ruby/models/batch_payment_details.rb +2 -2
  50. data/lib/xero-ruby/models/batch_payments.rb +2 -2
  51. data/lib/xero-ruby/models/bill.rb +2 -2
  52. data/lib/xero-ruby/models/branding_theme.rb +57 -3
  53. data/lib/xero-ruby/models/branding_themes.rb +2 -2
  54. data/lib/xero-ruby/models/cis_org_setting.rb +2 -2
  55. data/lib/xero-ruby/models/cis_setting.rb +2 -2
  56. data/lib/xero-ruby/models/cis_settings.rb +2 -2
  57. data/lib/xero-ruby/models/contact.rb +16 -6
  58. data/lib/xero-ruby/models/contact_group.rb +2 -2
  59. data/lib/xero-ruby/models/contact_groups.rb +2 -2
  60. data/lib/xero-ruby/models/contact_person.rb +2 -2
  61. data/lib/xero-ruby/models/contacts.rb +2 -2
  62. data/lib/xero-ruby/models/country_code.rb +2 -2
  63. data/lib/xero-ruby/models/credit_note.rb +13 -3
  64. data/lib/xero-ruby/models/credit_notes.rb +2 -2
  65. data/lib/xero-ruby/models/currencies.rb +2 -2
  66. data/lib/xero-ruby/models/currency.rb +2 -2
  67. data/lib/xero-ruby/models/currency_code.rb +2 -2
  68. data/lib/xero-ruby/models/element.rb +70 -6
  69. data/lib/xero-ruby/models/employee.rb +28 -6
  70. data/lib/xero-ruby/models/employees.rb +2 -2
  71. data/lib/xero-ruby/models/error.rb +2 -2
  72. data/lib/xero-ruby/models/expense_claim.rb +4 -4
  73. data/lib/xero-ruby/models/expense_claims.rb +2 -2
  74. data/lib/xero-ruby/models/external_link.rb +2 -2
  75. data/lib/xero-ruby/models/history_record.rb +2 -2
  76. data/lib/xero-ruby/models/history_records.rb +2 -2
  77. data/lib/xero-ruby/models/invoice.rb +20 -23
  78. data/lib/xero-ruby/models/invoice_reminder.rb +2 -2
  79. data/lib/xero-ruby/models/invoice_reminders.rb +2 -2
  80. data/lib/xero-ruby/models/invoices.rb +2 -2
  81. data/lib/xero-ruby/models/item.rb +13 -8
  82. data/lib/xero-ruby/models/items.rb +2 -2
  83. data/lib/xero-ruby/models/journal.rb +2 -2
  84. data/lib/xero-ruby/models/journal_line.rb +2 -2
  85. data/lib/xero-ruby/models/journals.rb +2 -2
  86. data/lib/xero-ruby/models/line_amount_types.rb +2 -2
  87. data/lib/xero-ruby/models/line_item.rb +4 -4
  88. data/lib/xero-ruby/models/line_item_tracking.rb +13 -3
  89. data/lib/xero-ruby/models/linked_transaction.rb +3 -8
  90. data/lib/xero-ruby/models/linked_transactions.rb +2 -2
  91. data/lib/xero-ruby/models/manual_journal.rb +15 -10
  92. data/lib/xero-ruby/models/manual_journal_line.rb +2 -2
  93. data/lib/xero-ruby/models/manual_journals.rb +2 -2
  94. data/lib/xero-ruby/models/online_invoice.rb +2 -2
  95. data/lib/xero-ruby/models/online_invoices.rb +2 -2
  96. data/lib/xero-ruby/models/organisation.rb +8 -8
  97. data/lib/xero-ruby/models/organisations.rb +2 -2
  98. data/lib/xero-ruby/models/overpayment.rb +2 -2
  99. data/lib/xero-ruby/models/overpayments.rb +2 -2
  100. data/lib/xero-ruby/models/payment.rb +2 -2
  101. data/lib/xero-ruby/models/payment_service.rb +2 -2
  102. data/lib/xero-ruby/models/payment_services.rb +2 -2
  103. data/lib/xero-ruby/models/payment_term.rb +2 -2
  104. data/lib/xero-ruby/models/payment_term_type.rb +2 -2
  105. data/lib/xero-ruby/models/payments.rb +2 -2
  106. data/lib/xero-ruby/models/phone.rb +2 -2
  107. data/lib/xero-ruby/models/prepayment.rb +13 -3
  108. data/lib/xero-ruby/models/prepayments.rb +2 -2
  109. data/lib/xero-ruby/models/purchase.rb +2 -2
  110. data/lib/xero-ruby/models/purchase_order.rb +3 -13
  111. data/lib/xero-ruby/models/purchase_orders.rb +2 -2
  112. data/lib/xero-ruby/models/quote.rb +487 -0
  113. data/lib/xero-ruby/models/quote_line_amount_types.rb +38 -0
  114. data/lib/xero-ruby/models/quote_status_codes.rb +40 -0
  115. data/lib/xero-ruby/models/quotes.rb +205 -0
  116. data/lib/xero-ruby/models/receipt.rb +17 -25
  117. data/lib/xero-ruby/models/receipts.rb +2 -2
  118. data/lib/xero-ruby/models/repeating_invoice.rb +4 -4
  119. data/lib/xero-ruby/models/repeating_invoices.rb +2 -2
  120. data/lib/xero-ruby/models/report.rb +2 -2
  121. data/lib/xero-ruby/models/report_attribute.rb +2 -2
  122. data/lib/xero-ruby/models/report_cell.rb +2 -2
  123. data/lib/xero-ruby/models/report_fields.rb +2 -2
  124. data/lib/xero-ruby/models/report_row.rb +2 -2
  125. data/lib/xero-ruby/models/report_rows.rb +2 -2
  126. data/lib/xero-ruby/models/report_with_row.rb +12 -12
  127. data/lib/xero-ruby/models/report_with_rows.rb +2 -2
  128. data/lib/xero-ruby/models/reports.rb +2 -2
  129. data/lib/xero-ruby/models/request_empty.rb +2 -2
  130. data/lib/xero-ruby/models/row_type.rb +2 -2
  131. data/lib/xero-ruby/models/sales_tracking_category.rb +2 -2
  132. data/lib/xero-ruby/models/schedule.rb +2 -2
  133. data/lib/xero-ruby/models/tax_component.rb +2 -2
  134. data/lib/xero-ruby/models/tax_rate.rb +6 -11
  135. data/lib/xero-ruby/models/tax_rates.rb +2 -2
  136. data/lib/xero-ruby/models/tax_type.rb +5 -2
  137. data/lib/xero-ruby/models/ten_nintey_nine_contact.rb +2 -2
  138. data/lib/xero-ruby/models/time_zone.rb +2 -2
  139. data/lib/xero-ruby/models/tracking_categories.rb +2 -2
  140. data/lib/xero-ruby/models/tracking_category.rb +2 -2
  141. data/lib/xero-ruby/models/tracking_option.rb +2 -2
  142. data/lib/xero-ruby/models/tracking_options.rb +2 -2
  143. data/lib/xero-ruby/models/user.rb +2 -2
  144. data/lib/xero-ruby/models/users.rb +2 -2
  145. data/lib/xero-ruby/models/validation_error.rb +2 -2
  146. data/lib/xero-ruby/version.rb +3 -3
  147. data/lib/xero-ruby.rb +6 -2
  148. data/pkg/xero-ruby-0.2.0.gem +0 -0
  149. data/spec/api/accounting_api_spec.rb +304 -209
  150. data/spec/api_client_spec.rb +2 -2
  151. data/spec/configuration_spec.rb +2 -2
  152. data/spec/models/account_spec.rb +9 -3
  153. data/spec/models/account_type_spec.rb +2 -2
  154. data/spec/models/accounts_payable_spec.rb +2 -2
  155. data/spec/models/accounts_receivable_spec.rb +2 -2
  156. data/spec/models/accounts_spec.rb +2 -2
  157. data/spec/models/address_spec.rb +2 -2
  158. data/spec/models/allocation_spec.rb +2 -2
  159. data/spec/models/allocations_spec.rb +2 -2
  160. data/spec/models/attachment_spec.rb +2 -2
  161. data/spec/models/attachments_spec.rb +2 -2
  162. data/spec/models/balances_spec.rb +2 -2
  163. data/spec/models/bank_transaction_spec.rb +2 -2
  164. data/spec/models/bank_transactions_spec.rb +2 -2
  165. data/spec/models/bank_transfer_spec.rb +2 -2
  166. data/spec/models/bank_transfers_spec.rb +2 -2
  167. data/spec/models/batch_payment_details_spec.rb +2 -2
  168. data/spec/models/batch_payment_spec.rb +10 -2
  169. data/spec/models/batch_payments_spec.rb +2 -2
  170. data/spec/models/bill_spec.rb +2 -2
  171. data/spec/models/branding_theme_spec.rb +18 -2
  172. data/spec/models/branding_themes_spec.rb +2 -2
  173. data/spec/models/cis_org_setting_spec.rb +2 -2
  174. data/spec/models/cis_setting_spec.rb +2 -2
  175. data/spec/models/cis_settings_spec.rb +2 -2
  176. data/spec/models/contact_group_spec.rb +2 -2
  177. data/spec/models/contact_groups_spec.rb +2 -2
  178. data/spec/models/contact_person_spec.rb +2 -2
  179. data/spec/models/contact_spec.rb +8 -2
  180. data/spec/models/contacts_spec.rb +2 -2
  181. data/spec/models/country_code_spec.rb +2 -2
  182. data/spec/models/credit_note_spec.rb +8 -2
  183. data/spec/models/credit_notes_spec.rb +2 -2
  184. data/spec/models/currencies_spec.rb +2 -2
  185. data/spec/models/currency_code_spec.rb +2 -2
  186. data/spec/models/currency_spec.rb +2 -2
  187. data/spec/models/element_spec.rb +44 -2
  188. data/spec/models/employee_spec.rb +14 -2
  189. data/spec/models/employees_spec.rb +2 -2
  190. data/spec/models/error_spec.rb +2 -2
  191. data/spec/models/expense_claim_spec.rb +3 -3
  192. data/spec/models/expense_claims_spec.rb +2 -2
  193. data/spec/models/external_link_spec.rb +2 -2
  194. data/spec/models/history_record_spec.rb +2 -2
  195. data/spec/models/history_records_spec.rb +2 -2
  196. data/spec/models/invoice_reminder_spec.rb +2 -2
  197. data/spec/models/invoice_reminders_spec.rb +2 -2
  198. data/spec/models/invoice_spec.rb +9 -3
  199. data/spec/models/invoices_spec.rb +2 -2
  200. data/spec/models/item_spec.rb +8 -2
  201. data/spec/models/items_spec.rb +2 -2
  202. data/spec/models/journal_line_spec.rb +2 -2
  203. data/spec/models/journal_spec.rb +2 -2
  204. data/spec/models/journals_spec.rb +2 -2
  205. data/spec/models/line_amount_types_spec.rb +2 -2
  206. data/spec/models/line_item_spec.rb +2 -2
  207. data/spec/models/line_item_tracking_spec.rb +8 -2
  208. data/spec/models/linked_transaction_spec.rb +2 -2
  209. data/spec/models/linked_transactions_spec.rb +2 -2
  210. data/spec/models/manual_journal_line_spec.rb +2 -2
  211. data/spec/models/manual_journal_spec.rb +9 -3
  212. data/spec/models/manual_journals_spec.rb +2 -2
  213. data/spec/models/online_invoice_spec.rb +2 -2
  214. data/spec/models/online_invoices_spec.rb +2 -2
  215. data/spec/models/organisation_spec.rb +5 -5
  216. data/spec/models/organisations_spec.rb +2 -2
  217. data/spec/models/overpayment_spec.rb +2 -2
  218. data/spec/models/overpayments_spec.rb +2 -2
  219. data/spec/models/payment_service_spec.rb +2 -2
  220. data/spec/models/payment_services_spec.rb +2 -2
  221. data/spec/models/payment_spec.rb +2 -2
  222. data/spec/models/payment_term_spec.rb +2 -2
  223. data/spec/models/payment_term_type_spec.rb +2 -2
  224. data/spec/models/payments_spec.rb +2 -2
  225. data/spec/models/phone_spec.rb +2 -2
  226. data/spec/models/prepayment_spec.rb +8 -2
  227. data/spec/models/prepayments_spec.rb +2 -2
  228. data/spec/models/purchase_order_spec.rb +2 -2
  229. data/spec/models/purchase_orders_spec.rb +2 -2
  230. data/spec/models/purchase_spec.rb +2 -2
  231. data/spec/models/quote_line_amount_types_spec.rb +35 -0
  232. data/spec/models/quote_spec.rb +167 -0
  233. data/spec/models/quote_status_codes_spec.rb +35 -0
  234. data/spec/models/quotes_spec.rb +41 -0
  235. data/spec/models/receipt_spec.rb +9 -3
  236. data/spec/models/receipts_spec.rb +2 -2
  237. data/spec/models/repeating_invoice_spec.rb +3 -3
  238. data/spec/models/repeating_invoices_spec.rb +2 -2
  239. data/spec/models/report_attribute_spec.rb +2 -2
  240. data/spec/models/report_cell_spec.rb +2 -2
  241. data/spec/models/report_fields_spec.rb +2 -2
  242. data/spec/models/report_row_spec.rb +2 -2
  243. data/spec/models/report_rows_spec.rb +2 -2
  244. data/spec/models/report_spec.rb +2 -2
  245. data/spec/models/report_with_row_spec.rb +4 -4
  246. data/spec/models/report_with_rows_spec.rb +2 -2
  247. data/spec/models/reports_spec.rb +2 -2
  248. data/spec/models/request_empty_spec.rb +2 -2
  249. data/spec/models/row_type_spec.rb +2 -2
  250. data/spec/models/sales_tracking_category_spec.rb +2 -2
  251. data/spec/models/schedule_spec.rb +2 -2
  252. data/spec/models/tax_component_spec.rb +2 -2
  253. data/spec/models/tax_rate_spec.rb +4 -4
  254. data/spec/models/tax_rates_spec.rb +2 -2
  255. data/spec/models/tax_type_spec.rb +2 -2
  256. data/spec/models/ten_nintey_nine_contact_spec.rb +2 -2
  257. data/spec/models/time_zone_spec.rb +2 -2
  258. data/spec/models/tracking_categories_spec.rb +2 -2
  259. data/spec/models/tracking_category_spec.rb +2 -2
  260. data/spec/models/tracking_option_spec.rb +2 -2
  261. data/spec/models/tracking_options_spec.rb +2 -2
  262. data/spec/models/user_spec.rb +2 -2
  263. data/spec/models/users_spec.rb +2 -2
  264. data/spec/models/validation_error_spec.rb +2 -2
  265. data/spec/spec_helper.rb +2 -2
  266. data/xero-ruby.gemspec +3 -3
  267. metadata +21 -5
  268. data/Gemfile.lock +0 -79
  269. data/pkg/xero-ruby-0.1.2.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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
10
10
 
11
11
  =end
12
12
 
@@ -123,6 +123,9 @@ module XeroRuby
123
123
  # Displays array of validation error messages from the API
124
124
  attr_accessor :validation_errors
125
125
 
126
+ # Displays array of warning messages from the API
127
+ attr_accessor :warnings
128
+
126
129
  class EnumAttributeValidator
127
130
  attr_reader :datatype
128
131
  attr_reader :allowable_values
@@ -184,7 +187,8 @@ module XeroRuby
184
187
  :'attachments' => :'Attachments',
185
188
  :'has_errors' => :'HasErrors',
186
189
  :'status_attribute_string' => :'StatusAttributeString',
187
- :'validation_errors' => :'ValidationErrors'
190
+ :'validation_errors' => :'ValidationErrors',
191
+ :'warnings' => :'Warnings'
188
192
  }
189
193
  end
190
194
 
@@ -227,7 +231,8 @@ module XeroRuby
227
231
  :'attachments' => :'Array<Attachment>',
228
232
  :'has_errors' => :'Boolean',
229
233
  :'status_attribute_string' => :'String',
230
- :'validation_errors' => :'Array<ValidationError>'
234
+ :'validation_errors' => :'Array<ValidationError>',
235
+ :'warnings' => :'Array<ValidationError>'
231
236
  }
232
237
  end
233
238
 
@@ -407,24 +412,18 @@ module XeroRuby
407
412
  self.validation_errors = value
408
413
  end
409
414
  end
415
+
416
+ if attributes.key?(:'warnings')
417
+ if (value = attributes[:'warnings']).is_a?(Array)
418
+ self.warnings = value
419
+ end
420
+ end
410
421
  end
411
422
 
412
423
  # Show invalid properties with the reasons. Usually used together with valid?
413
424
  # @return Array for valid properties with the reasons
414
425
  def list_invalid_properties
415
426
  invalid_properties = Array.new
416
- if @type.nil?
417
- invalid_properties.push('invalid value for "type", type cannot be nil.')
418
- end
419
-
420
- if @contact.nil?
421
- invalid_properties.push('invalid value for "contact", contact cannot be nil.')
422
- end
423
-
424
- if @line_items.nil?
425
- invalid_properties.push('invalid value for "line_items", line_items cannot be nil.')
426
- end
427
-
428
427
  if !@invoice_number.nil? && @invoice_number.to_s.length > 255
429
428
  invalid_properties.push('invalid value for "invoice_number", the character length must be smaller than or equal to 255.')
430
429
  end
@@ -439,11 +438,8 @@ module XeroRuby
439
438
  # Check to see if the all the properties in the model are valid
440
439
  # @return true if the model is valid
441
440
  def valid?
442
- return false if @type.nil?
443
- type_validator = EnumAttributeValidator.new('String', ["ACCREC", "ACCPAY", "ACCPAYCREDIT", "AROVERPAYMENT"])
441
+ type_validator = EnumAttributeValidator.new('String', ["ACCPAY", "ACCPAYCREDIT", "APOVERPAYMENT", "APPREPAYMENT", "ACCREC", "ACCRECCREDIT", "AROVERPAYMENT"])
444
442
  return false unless type_validator.valid?(@type)
445
- return false if @contact.nil?
446
- return false if @line_items.nil?
447
443
  return false if !@invoice_number.nil? && @invoice_number.to_s.length > 255
448
444
  return false if !@reference.nil? && @reference.to_s.length > 255
449
445
  status_validator = EnumAttributeValidator.new('String', ["DRAFT", "SUBMITTED", "DELETED", "AUTHORISED", "PAID", "VOIDED"])
@@ -454,7 +450,7 @@ module XeroRuby
454
450
  # Custom attribute writer method checking allowed values (enum).
455
451
  # @param [Object] type Object to be assigned
456
452
  def type=(type)
457
- validator = EnumAttributeValidator.new('String', ["ACCREC", "ACCPAY", "ACCPAYCREDIT", "AROVERPAYMENT"])
453
+ validator = EnumAttributeValidator.new('String', ["ACCPAY", "ACCPAYCREDIT", "APOVERPAYMENT", "APPREPAYMENT", "ACCREC", "ACCRECCREDIT", "AROVERPAYMENT"])
458
454
  unless validator.valid?(type)
459
455
  fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
460
456
  end
@@ -532,7 +528,8 @@ module XeroRuby
532
528
  attachments == o.attachments &&
533
529
  has_errors == o.has_errors &&
534
530
  status_attribute_string == o.status_attribute_string &&
535
- validation_errors == o.validation_errors
531
+ validation_errors == o.validation_errors &&
532
+ warnings == o.warnings
536
533
  end
537
534
 
538
535
  # @see the `==` method
@@ -544,7 +541,7 @@ module XeroRuby
544
541
  # Calculates hash code according to all attributes.
545
542
  # @return [Integer] Hash code
546
543
  def hash
547
- [type, contact, line_items, date, due_date, line_amount_types, invoice_number, reference, branding_theme_id, url, currency_code, currency_rate, status, sent_to_contact, expected_payment_date, planned_payment_date, cis_deduction, sub_total, total_tax, total, total_discount, invoice_id, has_attachments, is_discounted, payments, prepayments, overpayments, amount_due, amount_paid, fully_paid_on_date, amount_credited, updated_date_utc, credit_notes, attachments, has_errors, status_attribute_string, validation_errors].hash
544
+ [type, contact, line_items, date, due_date, line_amount_types, invoice_number, reference, branding_theme_id, url, currency_code, currency_rate, status, sent_to_contact, expected_payment_date, planned_payment_date, cis_deduction, sub_total, total_tax, total, total_discount, invoice_id, has_attachments, is_discounted, payments, prepayments, overpayments, amount_due, amount_paid, fully_paid_on_date, amount_credited, updated_date_utc, credit_notes, attachments, has_errors, status_attribute_string, validation_errors, warnings].hash
548
545
  end
549
546
 
550
547
  # Builds the object from hash
@@ -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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
10
10
 
11
11
  =end
12
12
 
@@ -55,6 +55,9 @@ module XeroRuby
55
55
  # The Xero identifier for an Item
56
56
  attr_accessor :item_id
57
57
 
58
+ # Status of object
59
+ attr_accessor :status_attribute_string
60
+
58
61
  # Displays array of validation error messages from the API
59
62
  attr_accessor :validation_errors
60
63
 
@@ -75,6 +78,7 @@ module XeroRuby
75
78
  :'quantity_on_hand' => :'QuantityOnHand',
76
79
  :'updated_date_utc' => :'UpdatedDateUTC',
77
80
  :'item_id' => :'ItemID',
81
+ :'status_attribute_string' => :'StatusAttributeString',
78
82
  :'validation_errors' => :'ValidationErrors'
79
83
  }
80
84
  end
@@ -96,6 +100,7 @@ module XeroRuby
96
100
  :'quantity_on_hand' => :'Float',
97
101
  :'updated_date_utc' => :'DateTime',
98
102
  :'item_id' => :'String',
103
+ :'status_attribute_string' => :'String',
99
104
  :'validation_errors' => :'Array<ValidationError>'
100
105
  }
101
106
  end
@@ -171,6 +176,10 @@ module XeroRuby
171
176
  self.item_id = attributes[:'item_id']
172
177
  end
173
178
 
179
+ if attributes.key?(:'status_attribute_string')
180
+ self.status_attribute_string = attributes[:'status_attribute_string']
181
+ end
182
+
174
183
  if attributes.key?(:'validation_errors')
175
184
  if (value = attributes[:'validation_errors']).is_a?(Array)
176
185
  self.validation_errors = value
@@ -190,10 +199,6 @@ module XeroRuby
190
199
  invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 30.')
191
200
  end
192
201
 
193
- if @inventory_asset_account_code.nil?
194
- invalid_properties.push('invalid value for "inventory_asset_account_code", inventory_asset_account_code cannot be nil.')
195
- end
196
-
197
202
  if !@name.nil? && @name.to_s.length > 50
198
203
  invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 50.')
199
204
  end
@@ -214,7 +219,6 @@ module XeroRuby
214
219
  def valid?
215
220
  return false if @code.nil?
216
221
  return false if @code.to_s.length > 30
217
- return false if @inventory_asset_account_code.nil?
218
222
  return false if !@name.nil? && @name.to_s.length > 50
219
223
  return false if !@description.nil? && @description.to_s.length > 4000
220
224
  return false if !@purchase_description.nil? && @purchase_description.to_s.length > 4000
@@ -284,6 +288,7 @@ module XeroRuby
284
288
  quantity_on_hand == o.quantity_on_hand &&
285
289
  updated_date_utc == o.updated_date_utc &&
286
290
  item_id == o.item_id &&
291
+ status_attribute_string == o.status_attribute_string &&
287
292
  validation_errors == o.validation_errors
288
293
  end
289
294
 
@@ -296,7 +301,7 @@ module XeroRuby
296
301
  # Calculates hash code according to all attributes.
297
302
  # @return [Integer] Hash code
298
303
  def hash
299
- [code, inventory_asset_account_code, name, is_sold, is_purchased, description, purchase_description, purchase_details, sales_details, is_tracked_as_inventory, total_cost_pool, quantity_on_hand, updated_date_utc, item_id, validation_errors].hash
304
+ [code, inventory_asset_account_code, name, is_sold, is_purchased, description, purchase_description, purchase_details, sales_details, is_tracked_as_inventory, total_cost_pool, quantity_on_hand, updated_date_utc, item_id, status_attribute_string, validation_errors].hash
300
305
  end
301
306
 
302
307
  # Builds the object from hash
@@ -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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
10
10
 
11
11
  =end
12
12
 
@@ -51,7 +51,7 @@ module XeroRuby
51
51
  # Discount amount being applied to a line item. Only supported on ACCREC invoices - ACCPAY invoices and credit notes in Xero do not support discounts.
52
52
  attr_accessor :discount_amount
53
53
 
54
- # The Xero identifier for a Repeating Invoicee.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
54
+ # The Xero identifier for a Repeating Invoice
55
55
  attr_accessor :repeating_invoice_id
56
56
 
57
57
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -86,7 +86,7 @@ module XeroRuby
86
86
  :'tax_amount' => :'Float',
87
87
  :'line_amount' => :'Float',
88
88
  :'tracking' => :'Array<LineItemTracking>',
89
- :'discount_rate' => :'String',
89
+ :'discount_rate' => :'Float',
90
90
  :'discount_amount' => :'Float',
91
91
  :'repeating_invoice_id' => :'String'
92
92
  }
@@ -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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
10
10
 
11
11
  =end
12
12
 
@@ -18,6 +18,9 @@ module XeroRuby
18
18
  # The Xero identifier for a tracking category
19
19
  attr_accessor :tracking_category_id
20
20
 
21
+ # The Xero identifier for a tracking category option
22
+ attr_accessor :tracking_option_id
23
+
21
24
  # The name of the tracking category
22
25
  attr_accessor :name
23
26
 
@@ -28,6 +31,7 @@ module XeroRuby
28
31
  def self.attribute_map
29
32
  {
30
33
  :'tracking_category_id' => :'TrackingCategoryID',
34
+ :'tracking_option_id' => :'TrackingOptionID',
31
35
  :'name' => :'Name',
32
36
  :'option' => :'Option'
33
37
  }
@@ -37,6 +41,7 @@ module XeroRuby
37
41
  def self.openapi_types
38
42
  {
39
43
  :'tracking_category_id' => :'String',
44
+ :'tracking_option_id' => :'String',
40
45
  :'name' => :'String',
41
46
  :'option' => :'String'
42
47
  }
@@ -61,6 +66,10 @@ module XeroRuby
61
66
  self.tracking_category_id = attributes[:'tracking_category_id']
62
67
  end
63
68
 
69
+ if attributes.key?(:'tracking_option_id')
70
+ self.tracking_option_id = attributes[:'tracking_option_id']
71
+ end
72
+
64
73
  if attributes.key?(:'name')
65
74
  self.name = attributes[:'name']
66
75
  end
@@ -104,6 +113,7 @@ module XeroRuby
104
113
  return true if self.equal?(o)
105
114
  self.class == o.class &&
106
115
  tracking_category_id == o.tracking_category_id &&
116
+ tracking_option_id == o.tracking_option_id &&
107
117
  name == o.name &&
108
118
  option == o.option
109
119
  end
@@ -117,7 +127,7 @@ module XeroRuby
117
127
  # Calculates hash code according to all attributes.
118
128
  # @return [Integer] Hash code
119
129
  def hash
120
- [tracking_category_id, name, option].hash
130
+ [tracking_category_id, tracking_option_id, name, option].hash
121
131
  end
122
132
 
123
133
  # Builds the object from hash
@@ -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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
10
10
 
11
11
  =end
12
12
 
@@ -30,7 +30,7 @@ module XeroRuby
30
30
  # The line item identifier from the target transaction. It is possible to link multiple billable expenses to the same TargetLineItemID.
31
31
  attr_accessor :target_line_item_id
32
32
 
33
- # The Xero identifier for an Linked Transaction e.g. /LinkedTransactions/297c2dc5-cc47-4afd-8ec8-74990b8761e9
33
+ # The Xero identifier for an Linked Transaction e.g./LinkedTransactions/297c2dc5-cc47-4afd-8ec8-74990b8761e9
34
34
  attr_accessor :linked_transaction_id
35
35
 
36
36
  # Filter by the combination of ContactID and Status. Get all the linked transactions that have been assigned to a particular customer and have a particular status e.g. GET /LinkedTransactions?ContactID=4bb34b03-3378-4bb2-a0ed-6345abf3224e&Status=APPROVED.
@@ -170,17 +170,12 @@ module XeroRuby
170
170
  # @return Array for valid properties with the reasons
171
171
  def list_invalid_properties
172
172
  invalid_properties = Array.new
173
- if @source_line_item_id.nil?
174
- invalid_properties.push('invalid value for "source_line_item_id", source_line_item_id cannot be nil.')
175
- end
176
-
177
173
  invalid_properties
178
174
  end
179
175
 
180
176
  # Check to see if the all the properties in the model are valid
181
177
  # @return true if the model is valid
182
178
  def valid?
183
- return false if @source_line_item_id.nil?
184
179
  status_validator = EnumAttributeValidator.new('String', ["APPROVED", "DRAFT", "ONDRAFT", "BILLED", "VOIDED"])
185
180
  return false unless status_validator.valid?(@status)
186
181
  type_validator = EnumAttributeValidator.new('String', ["BILLABLEEXPENSE"])
@@ -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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
10
10
 
11
11
  =end
12
12
 
@@ -44,6 +44,9 @@ module XeroRuby
44
44
  # The Xero identifier for a Manual Journal
45
45
  attr_accessor :manual_journal_id
46
46
 
47
+ # A string to indicate if a invoice status
48
+ attr_accessor :status_attribute_string
49
+
47
50
  # Displays array of warning messages from the API
48
51
  attr_accessor :warnings
49
52
 
@@ -88,6 +91,7 @@ module XeroRuby
88
91
  :'has_attachments' => :'HasAttachments',
89
92
  :'updated_date_utc' => :'UpdatedDateUTC',
90
93
  :'manual_journal_id' => :'ManualJournalID',
94
+ :'status_attribute_string' => :'StatusAttributeString',
91
95
  :'warnings' => :'Warnings',
92
96
  :'validation_errors' => :'ValidationErrors',
93
97
  :'attachments' => :'Attachments'
@@ -107,6 +111,7 @@ module XeroRuby
107
111
  :'has_attachments' => :'Boolean',
108
112
  :'updated_date_utc' => :'DateTime',
109
113
  :'manual_journal_id' => :'String',
114
+ :'status_attribute_string' => :'String',
110
115
  :'warnings' => :'Array<ValidationError>',
111
116
  :'validation_errors' => :'Array<ValidationError>',
112
117
  :'attachments' => :'Array<Attachment>'
@@ -170,6 +175,10 @@ module XeroRuby
170
175
  self.manual_journal_id = attributes[:'manual_journal_id']
171
176
  end
172
177
 
178
+ if attributes.key?(:'status_attribute_string')
179
+ self.status_attribute_string = attributes[:'status_attribute_string']
180
+ end
181
+
173
182
  if attributes.key?(:'warnings')
174
183
  if (value = attributes[:'warnings']).is_a?(Array)
175
184
  self.warnings = value
@@ -197,10 +206,6 @@ module XeroRuby
197
206
  invalid_properties.push('invalid value for "narration", narration cannot be nil.')
198
207
  end
199
208
 
200
- if @journal_lines.nil?
201
- invalid_properties.push('invalid value for "journal_lines", journal_lines cannot be nil.')
202
- end
203
-
204
209
  invalid_properties
205
210
  end
206
211
 
@@ -208,8 +213,7 @@ module XeroRuby
208
213
  # @return true if the model is valid
209
214
  def valid?
210
215
  return false if @narration.nil?
211
- return false if @journal_lines.nil?
212
- status_validator = EnumAttributeValidator.new('String', ["DRAFT", "POSTED", "DELETED", "VOIDED"])
216
+ status_validator = EnumAttributeValidator.new('String', ["DRAFT", "POSTED", "DELETED", "VOIDED", "ARCHIVED"])
213
217
  return false unless status_validator.valid?(@status)
214
218
  true
215
219
  end
@@ -217,7 +221,7 @@ module XeroRuby
217
221
  # Custom attribute writer method checking allowed values (enum).
218
222
  # @param [Object] status Object to be assigned
219
223
  def status=(status)
220
- validator = EnumAttributeValidator.new('String', ["DRAFT", "POSTED", "DELETED", "VOIDED"])
224
+ validator = EnumAttributeValidator.new('String', ["DRAFT", "POSTED", "DELETED", "VOIDED", "ARCHIVED"])
221
225
  unless validator.valid?(status)
222
226
  fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
223
227
  end
@@ -239,6 +243,7 @@ module XeroRuby
239
243
  has_attachments == o.has_attachments &&
240
244
  updated_date_utc == o.updated_date_utc &&
241
245
  manual_journal_id == o.manual_journal_id &&
246
+ status_attribute_string == o.status_attribute_string &&
242
247
  warnings == o.warnings &&
243
248
  validation_errors == o.validation_errors &&
244
249
  attachments == o.attachments
@@ -253,7 +258,7 @@ module XeroRuby
253
258
  # Calculates hash code according to all attributes.
254
259
  # @return [Integer] Hash code
255
260
  def hash
256
- [narration, journal_lines, date, line_amount_types, status, url, show_on_cash_basis_reports, has_attachments, updated_date_utc, manual_journal_id, warnings, validation_errors, attachments].hash
261
+ [narration, journal_lines, date, line_amount_types, status, url, show_on_cash_basis_reports, has_attachments, updated_date_utc, manual_journal_id, status_attribute_string, warnings, validation_errors, attachments].hash
257
262
  end
258
263
 
259
264
  # Builds the object from hash
@@ -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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
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.0.0
6
+ The version of the OpenAPI document: 2.0.1
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.3
9
+ OpenAPI Generator version: 4.2.0
10
10
 
11
11
  =end
12
12