xero-ruby 3.16.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/lib/xero-ruby/api/accounting_api.rb +645 -3
  3. data/lib/xero-ruby/api/app_store_api.rb +6 -0
  4. data/lib/xero-ruby/api/asset_api.rb +16 -6
  5. data/lib/xero-ruby/api/files_api.rb +156 -20
  6. data/lib/xero-ruby/api/payroll_au_api.rb +326 -30
  7. data/lib/xero-ruby/api/payroll_nz_api.rb +417 -7
  8. data/lib/xero-ruby/api/payroll_uk_api.rb +81 -0
  9. data/lib/xero-ruby/api/project_api.rb +21 -0
  10. data/lib/xero-ruby/api_client.rb +7 -7
  11. data/lib/xero-ruby/models/accounting/account_type.rb +0 -4
  12. data/lib/xero-ruby/models/accounting/allocation.rb +21 -1
  13. data/lib/xero-ruby/models/accounting/bank_transactions.rb +23 -1
  14. data/lib/xero-ruby/models/accounting/contact.rb +1 -11
  15. data/lib/xero-ruby/models/accounting/contacts.rb +23 -1
  16. data/lib/xero-ruby/models/accounting/credit_note.rb +17 -5
  17. data/lib/xero-ruby/models/accounting/credit_notes.rb +23 -1
  18. data/lib/xero-ruby/models/accounting/currency_code.rb +10 -8
  19. data/lib/xero-ruby/models/accounting/invoice.rb +16 -4
  20. data/lib/xero-ruby/models/accounting/invoice_address.rb +338 -0
  21. data/lib/xero-ruby/models/accounting/invoices.rb +23 -1
  22. data/lib/xero-ruby/models/accounting/journals.rb +13 -1
  23. data/lib/xero-ruby/models/accounting/line_item.rb +75 -4
  24. data/lib/xero-ruby/models/accounting/manual_journals.rb +23 -1
  25. data/lib/xero-ruby/models/accounting/organisation.rb +9 -2
  26. data/lib/xero-ruby/models/accounting/overpayments.rb +23 -1
  27. data/lib/xero-ruby/models/accounting/pagination.rb +252 -0
  28. data/lib/xero-ruby/models/accounting/payment.rb +16 -4
  29. data/lib/xero-ruby/models/accounting/payments.rb +23 -1
  30. data/lib/xero-ruby/models/accounting/prepayments.rb +23 -1
  31. data/lib/xero-ruby/models/accounting/purchase_orders.rb +23 -1
  32. data/lib/xero-ruby/models/accounting/tax_breakdown_component.rb +351 -0
  33. data/lib/xero-ruby/models/accounting/tax_rate.rb +13 -6
  34. data/lib/xero-ruby/models/accounting/tax_type.rb +45 -4
  35. data/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb +75 -4
  36. data/lib/xero-ruby/models/files/association.rb +31 -1
  37. data/lib/xero-ruby/models/finance/current_statement_response.rb +1 -1
  38. data/lib/xero-ruby/models/finance/data_source_response.rb +13 -43
  39. data/lib/xero-ruby/models/finance/problem_type.rb +1 -0
  40. data/lib/xero-ruby/models/finance/statement_line_response.rb +11 -1
  41. data/lib/xero-ruby/models/finance/statement_response.rb +24 -4
  42. data/lib/xero-ruby/models/payroll_au/allowance_type.rb +0 -1
  43. data/lib/xero-ruby/models/payroll_au/country_of_residence.rb +0 -1
  44. data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +21 -1
  45. data/lib/xero-ruby/models/payroll_au/leave_application.rb +11 -1
  46. data/lib/xero-ruby/models/payroll_au/leave_earnings_line.rb +14 -4
  47. data/lib/xero-ruby/models/payroll_au/leave_line_calculation_type.rb +0 -1
  48. data/lib/xero-ruby/models/payroll_au/leave_period_status.rb +2 -0
  49. data/lib/xero-ruby/models/payroll_au/opening_balances.rb +16 -4
  50. data/lib/xero-ruby/models/payroll_au/paid_leave_earnings_line.rb +272 -0
  51. data/lib/xero-ruby/models/payroll_au/pay_out_type.rb +36 -0
  52. data/lib/xero-ruby/models/payroll_nz/employee.rb +34 -4
  53. data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +56 -6
  54. data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +47 -7
  55. data/lib/xero-ruby/models/payroll_nz/employee_working_pattern.rb +242 -0
  56. data/lib/xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks.rb +254 -0
  57. data/lib/xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks_object.rb +242 -0
  58. data/lib/xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks_request.rb +244 -0
  59. data/lib/xero-ruby/models/payroll_nz/employee_working_patterns_object.rb +244 -0
  60. data/lib/xero-ruby/models/payroll_nz/employment.rb +24 -4
  61. data/lib/xero-ruby/models/payroll_nz/leave_period.rb +35 -4
  62. data/lib/xero-ruby/models/payroll_nz/leave_type.rb +24 -4
  63. data/lib/xero-ruby/models/payroll_nz/salary_and_wage.rb +28 -4
  64. data/lib/xero-ruby/models/payroll_nz/working_week.rb +317 -0
  65. data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +3 -3
  66. data/lib/xero-ruby/models/payroll_uk/employee_leave_type.rb +14 -4
  67. data/lib/xero-ruby/models/projects/currency_code.rb +0 -1
  68. data/lib/xero-ruby/version.rb +2 -2
  69. data/lib/xero-ruby/where.rb +37 -37
  70. data/lib/xero-ruby.rb +11 -0
  71. data/spec/api_client_spec.rb +56 -56
  72. data/spec/api_error_spec.rb +1 -1
  73. data/spec/configuration_spec.rb +2 -2
  74. data/spec/helper_methods_spec.rb +3 -3
  75. data/spec/where_spec.rb +2 -2
  76. metadata +38 -27
@@ -82,6 +82,44 @@ module XeroRuby::Accounting
82
82
  # Contact contact id
83
83
  attr_accessor :contact_id
84
84
 
85
+ # Contact legal name
86
+ attr_accessor :legal_name
87
+
88
+ # Contact business name
89
+ attr_accessor :business_name
90
+
91
+ # Contact federal tax classification
92
+ attr_accessor :federal_tax_classification
93
+ SOLE_PROPRIETOR ||= "SOLE_PROPRIETOR".freeze
94
+ PARTNERSHIP ||= "PARTNERSHIP".freeze
95
+ TRUST_OR_ESTATE ||= "TRUST_OR_ESTATE".freeze
96
+ NONPROFIT ||= "NONPROFIT".freeze
97
+ C_CORP ||= "C_CORP".freeze
98
+ S_CORP ||= "S_CORP".freeze
99
+ OTHER ||= "OTHER".freeze
100
+
101
+ class EnumAttributeValidator
102
+ attr_reader :datatype
103
+ attr_reader :allowable_values
104
+
105
+ def initialize(datatype, allowable_values)
106
+ @allowable_values = allowable_values.map do |value|
107
+ case datatype.to_s
108
+ when /Integer/i
109
+ value.to_i
110
+ when /Float/i
111
+ value.to_f
112
+ else
113
+ value
114
+ end
115
+ end
116
+ end
117
+
118
+ def valid?(value)
119
+ !value || allowable_values.include?(value)
120
+ end
121
+ end
122
+
85
123
  # Attribute mapping from ruby-style variable name to JSON key.
86
124
  def self.attribute_map
87
125
  {
@@ -106,7 +144,10 @@ module XeroRuby::Accounting
106
144
  :'email' => :'Email',
107
145
  :'street_address' => :'StreetAddress',
108
146
  :'tax_id' => :'TaxID',
109
- :'contact_id' => :'ContactId'
147
+ :'contact_id' => :'ContactId',
148
+ :'legal_name' => :'LegalName',
149
+ :'business_name' => :'BusinessName',
150
+ :'federal_tax_classification' => :'FederalTaxClassification'
110
151
  }
111
152
  end
112
153
 
@@ -134,7 +175,10 @@ module XeroRuby::Accounting
134
175
  :'email' => :'String',
135
176
  :'street_address' => :'String',
136
177
  :'tax_id' => :'String',
137
- :'contact_id' => :'String'
178
+ :'contact_id' => :'String',
179
+ :'legal_name' => :'String',
180
+ :'business_name' => :'String',
181
+ :'federal_tax_classification' => :'String'
138
182
  }
139
183
  end
140
184
 
@@ -240,6 +284,18 @@ module XeroRuby::Accounting
240
284
  if attributes.key?(:'contact_id')
241
285
  self.contact_id = attributes[:'contact_id']
242
286
  end
287
+
288
+ if attributes.key?(:'legal_name')
289
+ self.legal_name = attributes[:'legal_name']
290
+ end
291
+
292
+ if attributes.key?(:'business_name')
293
+ self.business_name = attributes[:'business_name']
294
+ end
295
+
296
+ if attributes.key?(:'federal_tax_classification')
297
+ self.federal_tax_classification = attributes[:'federal_tax_classification']
298
+ end
243
299
  end
244
300
 
245
301
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -252,9 +308,21 @@ module XeroRuby::Accounting
252
308
  # Check to see if the all the properties in the model are valid
253
309
  # @return true if the model is valid
254
310
  def valid?
311
+ federal_tax_classification_validator = EnumAttributeValidator.new('String', ["SOLE_PROPRIETOR", "PARTNERSHIP", "TRUST_OR_ESTATE", "NONPROFIT", "C_CORP", "S_CORP", "OTHER"])
312
+ return false unless federal_tax_classification_validator.valid?(@federal_tax_classification)
255
313
  true
256
314
  end
257
315
 
316
+ # Custom attribute writer method checking allowed values (enum).
317
+ # @param [Object] federal_tax_classification Object to be assigned
318
+ def federal_tax_classification=(federal_tax_classification)
319
+ validator = EnumAttributeValidator.new('String', ["SOLE_PROPRIETOR", "PARTNERSHIP", "TRUST_OR_ESTATE", "NONPROFIT", "C_CORP", "S_CORP", "OTHER"])
320
+ unless validator.valid?(federal_tax_classification)
321
+ fail ArgumentError, "invalid value for \"federal_tax_classification\", must be one of #{validator.allowable_values}."
322
+ end
323
+ @federal_tax_classification = federal_tax_classification
324
+ end
325
+
258
326
  # Checks equality by comparing each attribute.
259
327
  # @param [Object] Object to be compared
260
328
  def ==(o)
@@ -281,7 +349,10 @@ module XeroRuby::Accounting
281
349
  email == o.email &&
282
350
  street_address == o.street_address &&
283
351
  tax_id == o.tax_id &&
284
- contact_id == o.contact_id
352
+ contact_id == o.contact_id &&
353
+ legal_name == o.legal_name &&
354
+ business_name == o.business_name &&
355
+ federal_tax_classification == o.federal_tax_classification
285
356
  end
286
357
 
287
358
  # @see the `==` method
@@ -293,7 +364,7 @@ module XeroRuby::Accounting
293
364
  # Calculates hash code according to all attributes.
294
365
  # @return [Integer] Hash code
295
366
  def hash
296
- [box1, box2, box3, box4, box5, box6, box7, box8, box9, box10, box11, box13, box14, name, federal_tax_id_type, city, zip, state, email, street_address, tax_id, contact_id].hash
367
+ [box1, box2, box3, box4, box5, box6, box7, box8, box9, box10, box11, box13, box14, name, federal_tax_id_type, city, zip, state, email, street_address, tax_id, contact_id, legal_name, business_name, federal_tax_classification].hash
297
368
  end
298
369
 
299
370
  # Builds the object from hash
@@ -16,6 +16,15 @@ module XeroRuby::Files
16
16
  require 'bigdecimal'
17
17
 
18
18
  class Association
19
+ # Boolean flag to determines whether the file is sent with the document it is attached to on client facing communications. Note- The SendWithObject element is only returned when using /Associations/{ObjectId} endpoint.
20
+ attr_accessor :send_with_object
21
+
22
+ # The name of the associated file. Note- The Name element is only returned when using /Associations/{ObjectId} endpoint.
23
+ attr_accessor :name
24
+
25
+ # The size of the associated file in bytes. Note- The Size element is only returned when using /Associations/{ObjectId} endpoint.
26
+ attr_accessor :size
27
+
19
28
  # The unique identifier of the file
20
29
  attr_accessor :file_id
21
30
 
@@ -31,6 +40,9 @@ module XeroRuby::Files
31
40
  # Attribute mapping from ruby-style variable name to JSON key.
32
41
  def self.attribute_map
33
42
  {
43
+ :'send_with_object' => :'SendWithObject',
44
+ :'name' => :'Name',
45
+ :'size' => :'Size',
34
46
  :'file_id' => :'FileId',
35
47
  :'object_id' => :'ObjectId',
36
48
  :'object_group' => :'ObjectGroup',
@@ -41,6 +53,9 @@ module XeroRuby::Files
41
53
  # Attribute type mapping.
42
54
  def self.openapi_types
43
55
  {
56
+ :'send_with_object' => :'Boolean',
57
+ :'name' => :'String',
58
+ :'size' => :'Integer',
44
59
  :'file_id' => :'String',
45
60
  :'object_id' => :'String',
46
61
  :'object_group' => :'ObjectGroup',
@@ -63,6 +78,18 @@ module XeroRuby::Files
63
78
  h[k.to_sym] = v
64
79
  }
65
80
 
81
+ if attributes.key?(:'send_with_object')
82
+ self.send_with_object = attributes[:'send_with_object']
83
+ end
84
+
85
+ if attributes.key?(:'name')
86
+ self.name = attributes[:'name']
87
+ end
88
+
89
+ if attributes.key?(:'size')
90
+ self.size = attributes[:'size']
91
+ end
92
+
66
93
  if attributes.key?(:'file_id')
67
94
  self.file_id = attributes[:'file_id']
68
95
  end
@@ -98,6 +125,9 @@ module XeroRuby::Files
98
125
  def ==(o)
99
126
  return true if self.equal?(o)
100
127
  self.class == o.class &&
128
+ send_with_object == o.send_with_object &&
129
+ name == o.name &&
130
+ size == o.size &&
101
131
  file_id == o.file_id &&
102
132
  object_id == o.object_id &&
103
133
  object_group == o.object_group &&
@@ -113,7 +143,7 @@ module XeroRuby::Files
113
143
  # Calculates hash code according to all attributes.
114
144
  # @return [Integer] Hash code
115
145
  def hash
116
- [file_id, object_id, object_group, object_type].hash
146
+ [send_with_object, name, size, file_id, object_id, object_group, object_type].hash
117
147
  end
118
148
 
119
149
  # Builds the object from hash
@@ -31,7 +31,7 @@ module XeroRuby::Finance
31
31
  # Looking at the most recent bank statement, this field indicates when the document was imported into Xero. This date is represented in ISO 8601 format.
32
32
  attr_accessor :imported_date_time_utc
33
33
 
34
- # Looking at the most recent bank statement, this field indicates the source of the data (direct bank feed, indirect bank feed, file upload, or manual keying).
34
+ # Looking at the most recent bank statement, this field indicates the source of the data (direct bank feed, file upload, or manual keying).
35
35
  attr_accessor :import_source_type
36
36
 
37
37
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -16,64 +16,52 @@ module XeroRuby::Finance
16
16
  require 'bigdecimal'
17
17
 
18
18
  class DataSourceResponse
19
- # Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data.
19
+ # Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data.
20
20
  attr_accessor :direct_bank_feed
21
21
 
22
- # Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data.
23
- attr_accessor :indirect_bank_feed
24
-
25
- # Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data.
22
+ # Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data.
26
23
  attr_accessor :file_upload
27
24
 
28
- # Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data.
25
+ # Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data.
29
26
  attr_accessor :manual
30
27
 
31
- # Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
28
+ # Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
32
29
  attr_accessor :direct_bank_feed_pos
33
30
 
34
- # Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
35
- attr_accessor :indirect_bank_feed_pos
36
-
37
- # Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
31
+ # Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
38
32
  attr_accessor :file_upload_pos
39
33
 
40
- # Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
34
+ # Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
41
35
  attr_accessor :manual_pos
42
36
 
43
- # Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
37
+ # Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
44
38
  attr_accessor :direct_bank_feed_neg
45
39
 
46
- # Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
47
- attr_accessor :indirect_bank_feed_neg
48
-
49
- # Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
40
+ # Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
50
41
  attr_accessor :file_upload_neg
51
42
 
52
- # Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
43
+ # Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
53
44
  attr_accessor :manual_neg
54
45
 
55
- # Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
46
+ # Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
56
47
  attr_accessor :other_pos
57
48
 
58
- # Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
49
+ # Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
59
50
  attr_accessor :other_neg
60
51
 
61
- # Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data.
52
+ # Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data.
62
53
  attr_accessor :other
63
54
 
64
55
  # Attribute mapping from ruby-style variable name to JSON key.
65
56
  def self.attribute_map
66
57
  {
67
58
  :'direct_bank_feed' => :'directBankFeed',
68
- :'indirect_bank_feed' => :'indirectBankFeed',
69
59
  :'file_upload' => :'fileUpload',
70
60
  :'manual' => :'manual',
71
61
  :'direct_bank_feed_pos' => :'directBankFeedPos',
72
- :'indirect_bank_feed_pos' => :'indirectBankFeedPos',
73
62
  :'file_upload_pos' => :'fileUploadPos',
74
63
  :'manual_pos' => :'manualPos',
75
64
  :'direct_bank_feed_neg' => :'directBankFeedNeg',
76
- :'indirect_bank_feed_neg' => :'indirectBankFeedNeg',
77
65
  :'file_upload_neg' => :'fileUploadNeg',
78
66
  :'manual_neg' => :'manualNeg',
79
67
  :'other_pos' => :'otherPos',
@@ -86,15 +74,12 @@ module XeroRuby::Finance
86
74
  def self.openapi_types
87
75
  {
88
76
  :'direct_bank_feed' => :'BigDecimal',
89
- :'indirect_bank_feed' => :'BigDecimal',
90
77
  :'file_upload' => :'BigDecimal',
91
78
  :'manual' => :'BigDecimal',
92
79
  :'direct_bank_feed_pos' => :'BigDecimal',
93
- :'indirect_bank_feed_pos' => :'BigDecimal',
94
80
  :'file_upload_pos' => :'BigDecimal',
95
81
  :'manual_pos' => :'BigDecimal',
96
82
  :'direct_bank_feed_neg' => :'BigDecimal',
97
- :'indirect_bank_feed_neg' => :'BigDecimal',
98
83
  :'file_upload_neg' => :'BigDecimal',
99
84
  :'manual_neg' => :'BigDecimal',
100
85
  :'other_pos' => :'BigDecimal',
@@ -122,10 +107,6 @@ module XeroRuby::Finance
122
107
  self.direct_bank_feed = attributes[:'direct_bank_feed']
123
108
  end
124
109
 
125
- if attributes.key?(:'indirect_bank_feed')
126
- self.indirect_bank_feed = attributes[:'indirect_bank_feed']
127
- end
128
-
129
110
  if attributes.key?(:'file_upload')
130
111
  self.file_upload = attributes[:'file_upload']
131
112
  end
@@ -138,10 +119,6 @@ module XeroRuby::Finance
138
119
  self.direct_bank_feed_pos = attributes[:'direct_bank_feed_pos']
139
120
  end
140
121
 
141
- if attributes.key?(:'indirect_bank_feed_pos')
142
- self.indirect_bank_feed_pos = attributes[:'indirect_bank_feed_pos']
143
- end
144
-
145
122
  if attributes.key?(:'file_upload_pos')
146
123
  self.file_upload_pos = attributes[:'file_upload_pos']
147
124
  end
@@ -154,10 +131,6 @@ module XeroRuby::Finance
154
131
  self.direct_bank_feed_neg = attributes[:'direct_bank_feed_neg']
155
132
  end
156
133
 
157
- if attributes.key?(:'indirect_bank_feed_neg')
158
- self.indirect_bank_feed_neg = attributes[:'indirect_bank_feed_neg']
159
- end
160
-
161
134
  if attributes.key?(:'file_upload_neg')
162
135
  self.file_upload_neg = attributes[:'file_upload_neg']
163
136
  end
@@ -198,15 +171,12 @@ module XeroRuby::Finance
198
171
  return true if self.equal?(o)
199
172
  self.class == o.class &&
200
173
  direct_bank_feed == o.direct_bank_feed &&
201
- indirect_bank_feed == o.indirect_bank_feed &&
202
174
  file_upload == o.file_upload &&
203
175
  manual == o.manual &&
204
176
  direct_bank_feed_pos == o.direct_bank_feed_pos &&
205
- indirect_bank_feed_pos == o.indirect_bank_feed_pos &&
206
177
  file_upload_pos == o.file_upload_pos &&
207
178
  manual_pos == o.manual_pos &&
208
179
  direct_bank_feed_neg == o.direct_bank_feed_neg &&
209
- indirect_bank_feed_neg == o.indirect_bank_feed_neg &&
210
180
  file_upload_neg == o.file_upload_neg &&
211
181
  manual_neg == o.manual_neg &&
212
182
  other_pos == o.other_pos &&
@@ -223,7 +193,7 @@ module XeroRuby::Finance
223
193
  # Calculates hash code according to all attributes.
224
194
  # @return [Integer] Hash code
225
195
  def hash
226
- [direct_bank_feed, indirect_bank_feed, file_upload, manual, direct_bank_feed_pos, indirect_bank_feed_pos, file_upload_pos, manual_pos, direct_bank_feed_neg, indirect_bank_feed_neg, file_upload_neg, manual_neg, other_pos, other_neg, other].hash
196
+ [direct_bank_feed, file_upload, manual, direct_bank_feed_pos, file_upload_pos, manual_pos, direct_bank_feed_neg, file_upload_neg, manual_neg, other_pos, other_neg, other].hash
227
197
  end
228
198
 
229
199
  # Builds the object from hash
@@ -24,6 +24,7 @@ module XeroRuby::Finance
24
24
  REQUEST_TIMEOUT ||= "request-timeout".freeze
25
25
  SERVICE_UNAVAILABLE ||= "service-unavailable".freeze
26
26
  UNAUTHORIZED ||= "unauthorized".freeze
27
+ RATE_LIMIT_ERROR ||= "rate-limit-error".freeze
27
28
 
28
29
  # Builds the enum from string
29
30
  # @param [String] The enum value in the form of the string
@@ -22,6 +22,9 @@ module XeroRuby::Finance
22
22
  # Date of when statement line was posted
23
23
  attr_accessor :posted_date
24
24
 
25
+ # Payee description of statement line
26
+ attr_accessor :payee
27
+
25
28
  # Reference description of statement line
26
29
  attr_accessor :reference
27
30
 
@@ -60,6 +63,7 @@ module XeroRuby::Finance
60
63
  {
61
64
  :'statement_line_id' => :'statementLineId',
62
65
  :'posted_date' => :'postedDate',
66
+ :'payee' => :'payee',
63
67
  :'reference' => :'reference',
64
68
  :'notes' => :'notes',
65
69
  :'cheque_no' => :'chequeNo',
@@ -79,6 +83,7 @@ module XeroRuby::Finance
79
83
  {
80
84
  :'statement_line_id' => :'String',
81
85
  :'posted_date' => :'Date',
86
+ :'payee' => :'String',
82
87
  :'reference' => :'String',
83
88
  :'notes' => :'String',
84
89
  :'cheque_no' => :'String',
@@ -116,6 +121,10 @@ module XeroRuby::Finance
116
121
  self.posted_date = attributes[:'posted_date']
117
122
  end
118
123
 
124
+ if attributes.key?(:'payee')
125
+ self.payee = attributes[:'payee']
126
+ end
127
+
119
128
  if attributes.key?(:'reference')
120
129
  self.reference = attributes[:'reference']
121
130
  end
@@ -185,6 +194,7 @@ module XeroRuby::Finance
185
194
  self.class == o.class &&
186
195
  statement_line_id == o.statement_line_id &&
187
196
  posted_date == o.posted_date &&
197
+ payee == o.payee &&
188
198
  reference == o.reference &&
189
199
  notes == o.notes &&
190
200
  cheque_no == o.cheque_no &&
@@ -207,7 +217,7 @@ module XeroRuby::Finance
207
217
  # Calculates hash code according to all attributes.
208
218
  # @return [Integer] Hash code
209
219
  def hash
210
- [statement_line_id, posted_date, reference, notes, cheque_no, amount, transaction_date, type, is_reconciled, is_duplicate, is_deleted, payments, bank_transactions].hash
220
+ [statement_line_id, posted_date, payee, reference, notes, cheque_no, amount, transaction_date, type, is_reconciled, is_duplicate, is_deleted, payments, bank_transactions].hash
211
221
  end
212
222
 
213
223
  # Builds the object from hash
@@ -28,15 +28,21 @@ module XeroRuby::Finance
28
28
  # Utc date time of when the statement was imported in Xero
29
29
  attr_accessor :imported_date_time_utc
30
30
 
31
- # Indicates the source of the statement data. Either imported from 1) direct bank feed OR 2) manual customer entry or upload. Manual import sources are STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/OFX, Ofx or STMTIMPORTSRC/QIF. All other import sources are direct and, depending on the direct solution, may contain the name of the financial institution.
31
+ # Identifies where the statement data in Xero was sourced, 1) direct bank feed, automatically loaded from the bank (eg STMTIMPORTSRC/CBAFEED); 2) indirect bank feed, automatically loaded from a 3rd party provider (eg STMTIMPORTSRC/YODLEE); 3) manually uploaded bank feed (eg STMTIMPORTSRC/CSV) or 4) manually entered statement data (STMTIMPORTSRC/MANUAL).
32
32
  attr_accessor :import_source
33
33
 
34
- # Opening balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied.
34
+ # Opening balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. Where not supplied, the value will be 0.
35
35
  attr_accessor :start_balance
36
36
 
37
- # Closing balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied.
37
+ # Closing balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. Where not supplied, the value will be 0.
38
38
  attr_accessor :end_balance
39
39
 
40
+ # Opening statement balance calculated in Xero (= bank account conversion balance plus sum of imported bank statement lines). Note: If indicative statement balance doesn't match imported statement balance for the same date, either the conversion (opening at inception) balance in Xero is wrong or there's an error in the bank statement lines in Xero. Ref: https://central.xero.com/s/article/Compare-the-statement-balance-in-Xero-to-your-actual-bank-balance?userregion=true
41
+ attr_accessor :indicative_start_balance
42
+
43
+ # Closing statement balance calculated in Xero (= bank account conversion balance plus sum of imported bank statement lines). Note: If indicative statement balance doesn't match imported statement balance for the same date, either the conversion (opening at inception) balance in Xero is wrong or there's an error in the bank statement lines in Xero. Ref: https://central.xero.com/s/article/Compare-the-statement-balance-in-Xero-to-your-actual-bank-balance?userregion=true
44
+ attr_accessor :indicative_end_balance
45
+
40
46
  # List of statement lines
41
47
  attr_accessor :statement_lines
42
48
 
@@ -50,6 +56,8 @@ module XeroRuby::Finance
50
56
  :'import_source' => :'importSource',
51
57
  :'start_balance' => :'startBalance',
52
58
  :'end_balance' => :'endBalance',
59
+ :'indicative_start_balance' => :'indicativeStartBalance',
60
+ :'indicative_end_balance' => :'indicativeEndBalance',
53
61
  :'statement_lines' => :'statementLines'
54
62
  }
55
63
  end
@@ -64,6 +72,8 @@ module XeroRuby::Finance
64
72
  :'import_source' => :'String',
65
73
  :'start_balance' => :'BigDecimal',
66
74
  :'end_balance' => :'BigDecimal',
75
+ :'indicative_start_balance' => :'BigDecimal',
76
+ :'indicative_end_balance' => :'BigDecimal',
67
77
  :'statement_lines' => :'Array<StatementLineResponse>'
68
78
  }
69
79
  end
@@ -111,6 +121,14 @@ module XeroRuby::Finance
111
121
  self.end_balance = attributes[:'end_balance']
112
122
  end
113
123
 
124
+ if attributes.key?(:'indicative_start_balance')
125
+ self.indicative_start_balance = attributes[:'indicative_start_balance']
126
+ end
127
+
128
+ if attributes.key?(:'indicative_end_balance')
129
+ self.indicative_end_balance = attributes[:'indicative_end_balance']
130
+ end
131
+
114
132
  if attributes.key?(:'statement_lines')
115
133
  if (value = attributes[:'statement_lines']).is_a?(Array)
116
134
  self.statement_lines = value
@@ -143,6 +161,8 @@ module XeroRuby::Finance
143
161
  import_source == o.import_source &&
144
162
  start_balance == o.start_balance &&
145
163
  end_balance == o.end_balance &&
164
+ indicative_start_balance == o.indicative_start_balance &&
165
+ indicative_end_balance == o.indicative_end_balance &&
146
166
  statement_lines == o.statement_lines
147
167
  end
148
168
 
@@ -155,7 +175,7 @@ module XeroRuby::Finance
155
175
  # Calculates hash code according to all attributes.
156
176
  # @return [Integer] Hash code
157
177
  def hash
158
- [statement_id, start_date, end_date, imported_date_time_utc, import_source, start_balance, end_balance, statement_lines].hash
178
+ [statement_id, start_date, end_date, imported_date_time_utc, import_source, start_balance, end_balance, indicative_start_balance, indicative_end_balance, statement_lines].hash
159
179
  end
160
180
 
161
181
  # Builds the object from hash
@@ -20,7 +20,6 @@ module XeroRuby::PayrollAu
20
20
  MEALS ||= "MEALS".freeze
21
21
  TRAVEL ||= "TRAVEL".freeze
22
22
  OTHER ||= "OTHER".freeze
23
- JOBKEEPER ||= "JOBKEEPER".freeze
24
23
  TOOLS ||= "TOOLS".freeze
25
24
  TASKS ||= "TASKS".freeze
26
25
  QUALIFICATIONS ||= "QUALIFICATIONS".freeze
@@ -264,7 +264,6 @@ module XeroRuby::PayrollAu
264
264
  CW ||= "CW".freeze
265
265
  SX ||= "SX".freeze
266
266
  SS ||= "SS".freeze
267
- EMPTY ||= "".freeze
268
267
 
269
268
  # Builds the enum from string
270
269
  # @param [String] The enum value in the form of the string
@@ -34,6 +34,12 @@ module XeroRuby::PayrollAu
34
34
  # Boolean to determine if the earnings rate is reportable or exempt from W1
35
35
  attr_accessor :is_reportable_as_w1
36
36
 
37
+ # Boolean to determine if the allowance earnings rate contributes towards annual leave rate. Only applicable if EarningsType is ALLOWANCE and RateType is RATEPERUNIT
38
+ attr_accessor :allowance_contributes_to_annual_leave_rate
39
+
40
+ # Boolean to determine if the allowance earnings rate contributes towards overtime allowance rate. Only applicable if EarningsType is ALLOWANCE and RateType is RATEPERUNIT
41
+ attr_accessor :allowance_contributes_to_overtime_rate
42
+
37
43
 
38
44
  attr_accessor :earnings_type
39
45
 
@@ -79,6 +85,8 @@ module XeroRuby::PayrollAu
79
85
  :'is_exempt_from_tax' => :'IsExemptFromTax',
80
86
  :'is_exempt_from_super' => :'IsExemptFromSuper',
81
87
  :'is_reportable_as_w1' => :'IsReportableAsW1',
88
+ :'allowance_contributes_to_annual_leave_rate' => :'AllowanceContributesToAnnualLeaveRate',
89
+ :'allowance_contributes_to_overtime_rate' => :'AllowanceContributesToOvertimeRate',
82
90
  :'earnings_type' => :'EarningsType',
83
91
  :'earnings_rate_id' => :'EarningsRateID',
84
92
  :'rate_type' => :'RateType',
@@ -103,6 +111,8 @@ module XeroRuby::PayrollAu
103
111
  :'is_exempt_from_tax' => :'Boolean',
104
112
  :'is_exempt_from_super' => :'Boolean',
105
113
  :'is_reportable_as_w1' => :'Boolean',
114
+ :'allowance_contributes_to_annual_leave_rate' => :'Boolean',
115
+ :'allowance_contributes_to_overtime_rate' => :'Boolean',
106
116
  :'earnings_type' => :'EarningsType',
107
117
  :'earnings_rate_id' => :'String',
108
118
  :'rate_type' => :'RateType',
@@ -157,6 +167,14 @@ module XeroRuby::PayrollAu
157
167
  self.is_reportable_as_w1 = attributes[:'is_reportable_as_w1']
158
168
  end
159
169
 
170
+ if attributes.key?(:'allowance_contributes_to_annual_leave_rate')
171
+ self.allowance_contributes_to_annual_leave_rate = attributes[:'allowance_contributes_to_annual_leave_rate']
172
+ end
173
+
174
+ if attributes.key?(:'allowance_contributes_to_overtime_rate')
175
+ self.allowance_contributes_to_overtime_rate = attributes[:'allowance_contributes_to_overtime_rate']
176
+ end
177
+
160
178
  if attributes.key?(:'earnings_type')
161
179
  self.earnings_type = attributes[:'earnings_type']
162
180
  end
@@ -260,6 +278,8 @@ module XeroRuby::PayrollAu
260
278
  is_exempt_from_tax == o.is_exempt_from_tax &&
261
279
  is_exempt_from_super == o.is_exempt_from_super &&
262
280
  is_reportable_as_w1 == o.is_reportable_as_w1 &&
281
+ allowance_contributes_to_annual_leave_rate == o.allowance_contributes_to_annual_leave_rate &&
282
+ allowance_contributes_to_overtime_rate == o.allowance_contributes_to_overtime_rate &&
263
283
  earnings_type == o.earnings_type &&
264
284
  earnings_rate_id == o.earnings_rate_id &&
265
285
  rate_type == o.rate_type &&
@@ -283,7 +303,7 @@ module XeroRuby::PayrollAu
283
303
  # Calculates hash code according to all attributes.
284
304
  # @return [Integer] Hash code
285
305
  def hash
286
- [name, account_code, type_of_units, is_exempt_from_tax, is_exempt_from_super, is_reportable_as_w1, earnings_type, earnings_rate_id, rate_type, rate_per_unit, multiplier, accrue_leave, amount, employment_termination_payment_type, updated_date_utc, current_record, allowance_type, allowance_category].hash
306
+ [name, account_code, type_of_units, is_exempt_from_tax, is_exempt_from_super, is_reportable_as_w1, allowance_contributes_to_annual_leave_rate, allowance_contributes_to_overtime_rate, earnings_type, earnings_rate_id, rate_type, rate_per_unit, multiplier, accrue_leave, amount, employment_termination_payment_type, updated_date_utc, current_record, allowance_type, allowance_category].hash
287
307
  end
288
308
 
289
309
  # Builds the object from hash
@@ -38,6 +38,9 @@ module XeroRuby::PayrollAu
38
38
  attr_accessor :description
39
39
 
40
40
 
41
+ attr_accessor :pay_out_type
42
+
43
+
41
44
  attr_accessor :leave_periods
42
45
 
43
46
  # Last modified timestamp
@@ -56,6 +59,7 @@ module XeroRuby::PayrollAu
56
59
  :'start_date' => :'StartDate',
57
60
  :'end_date' => :'EndDate',
58
61
  :'description' => :'Description',
62
+ :'pay_out_type' => :'PayOutType',
59
63
  :'leave_periods' => :'LeavePeriods',
60
64
  :'updated_date_utc' => :'UpdatedDateUTC',
61
65
  :'validation_errors' => :'ValidationErrors'
@@ -72,6 +76,7 @@ module XeroRuby::PayrollAu
72
76
  :'start_date' => :'Date',
73
77
  :'end_date' => :'Date',
74
78
  :'description' => :'String',
79
+ :'pay_out_type' => :'PayOutType',
75
80
  :'leave_periods' => :'Array<LeavePeriod>',
76
81
  :'updated_date_utc' => :'DateTime',
77
82
  :'validation_errors' => :'Array<ValidationError>'
@@ -121,6 +126,10 @@ module XeroRuby::PayrollAu
121
126
  self.description = attributes[:'description']
122
127
  end
123
128
 
129
+ if attributes.key?(:'pay_out_type')
130
+ self.pay_out_type = attributes[:'pay_out_type']
131
+ end
132
+
124
133
  if attributes.key?(:'leave_periods')
125
134
  if (value = attributes[:'leave_periods']).is_a?(Array)
126
135
  self.leave_periods = value
@@ -163,6 +172,7 @@ module XeroRuby::PayrollAu
163
172
  start_date == o.start_date &&
164
173
  end_date == o.end_date &&
165
174
  description == o.description &&
175
+ pay_out_type == o.pay_out_type &&
166
176
  leave_periods == o.leave_periods &&
167
177
  updated_date_utc == o.updated_date_utc &&
168
178
  validation_errors == o.validation_errors
@@ -177,7 +187,7 @@ module XeroRuby::PayrollAu
177
187
  # Calculates hash code according to all attributes.
178
188
  # @return [Integer] Hash code
179
189
  def hash
180
- [leave_application_id, employee_id, leave_type_id, title, start_date, end_date, description, leave_periods, updated_date_utc, validation_errors].hash
190
+ [leave_application_id, employee_id, leave_type_id, title, start_date, end_date, description, pay_out_type, leave_periods, updated_date_utc, validation_errors].hash
181
191
  end
182
192
 
183
193
  # Builds the object from hash