xero-ruby 3.9.0 → 3.12.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.
@@ -0,0 +1,229 @@
1
+ =begin
2
+ #Xero Accounting API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ Contact: api@xero.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 4.3.1
9
+
10
+ =end
11
+
12
+ require 'time'
13
+ require 'date'
14
+
15
+ module XeroRuby::Accounting
16
+ require 'bigdecimal'
17
+
18
+ class BatchPaymentDeleteByUrlParam
19
+ # The status of the batch payment.
20
+ attr_accessor :status
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'status' => :'Status'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'status' => :'String'
33
+ }
34
+ end
35
+
36
+ # Initializes the object
37
+ # @param [Hash] attributes Model attributes in the form of hash
38
+ def initialize(attributes = {})
39
+ if (!attributes.is_a?(Hash))
40
+ fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::BatchPaymentDeleteByUrlParam` initialize method"
41
+ end
42
+
43
+ # check to see if the attribute exists and convert string to symbol for hash key
44
+ attributes = attributes.each_with_object({}) { |(k, v), h|
45
+ if (!self.class.attribute_map.key?(k.to_sym))
46
+ fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::BatchPaymentDeleteByUrlParam`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
47
+ end
48
+ h[k.to_sym] = v
49
+ }
50
+
51
+ if attributes.key?(:'status')
52
+ self.status = attributes[:'status']
53
+ else
54
+ self.status = 'DELETED'
55
+ end
56
+ end
57
+
58
+ # Show invalid properties with the reasons. Usually used together with valid?
59
+ # @return Array for valid properties with the reasons
60
+ def list_invalid_properties
61
+ invalid_properties = Array.new
62
+ if @status.nil?
63
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
64
+ end
65
+
66
+ invalid_properties
67
+ end
68
+
69
+ # Check to see if the all the properties in the model are valid
70
+ # @return true if the model is valid
71
+ def valid?
72
+ return false if @status.nil?
73
+ true
74
+ end
75
+
76
+ # Checks equality by comparing each attribute.
77
+ # @param [Object] Object to be compared
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ status == o.status
82
+ end
83
+
84
+ # @see the `==` method
85
+ # @param [Object] Object to be compared
86
+ def eql?(o)
87
+ self == o
88
+ end
89
+
90
+ # Calculates hash code according to all attributes.
91
+ # @return [Integer] Hash code
92
+ def hash
93
+ [status].hash
94
+ end
95
+
96
+ # Builds the object from hash
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ # @return [Object] Returns the model itself
99
+ def self.build_from_hash(attributes)
100
+ new.build_from_hash(attributes)
101
+ end
102
+
103
+ # Builds the object from hash
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ # @return [Object] Returns the model itself
106
+ def build_from_hash(attributes)
107
+ return nil unless attributes.is_a?(Hash)
108
+ self.class.openapi_types.each_pair do |key, type|
109
+ if type =~ /\AArray<(.*)>/i
110
+ # check to ensure the input is an array given that the attribute
111
+ # is documented as an array but the input is not
112
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
113
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
114
+ end
115
+ elsif !attributes[self.class.attribute_map[key]].nil?
116
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
118
+ end
119
+
120
+ self
121
+ end
122
+
123
+ # Deserializes the data based on type
124
+ # @param string type Data type
125
+ # @param string value Value to be deserialized
126
+ # @return [Object] Deserialized data
127
+ def _deserialize(type, value)
128
+ case type.to_sym
129
+ when :DateTime
130
+ DateTime.parse(parse_date(value))
131
+ when :Date
132
+ Date.parse(parse_date(value))
133
+ when :String
134
+ value.to_s
135
+ when :Integer
136
+ value.to_i
137
+ when :Float
138
+ value.to_f
139
+ when :BigDecimal
140
+ BigDecimal(value.to_s)
141
+ when :Boolean
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else # model
162
+ XeroRuby::Accounting.const_get(type).build_from_hash(value)
163
+ end
164
+ end
165
+
166
+ # Returns the string representation of the object
167
+ # @return [String] String presentation of the object
168
+ def to_s
169
+ to_hash.to_s
170
+ end
171
+
172
+ # to_body is an alias to to_hash (backward compatibility)
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_body
175
+ to_hash
176
+ end
177
+
178
+ # Returns the object in the form of hash
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_hash(downcase: false)
181
+ hash = {}
182
+ self.class.attribute_map.each_pair do |attr, param|
183
+ value = self.send(attr)
184
+ next if value.nil?
185
+ key = downcase ? attr : param
186
+ hash[key] = _to_hash(value, downcase: downcase)
187
+ end
188
+ hash
189
+ end
190
+
191
+ # Returns the object in the form of hash with snake_case
192
+ def to_attributes
193
+ to_hash(downcase: true)
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value, downcase: false)
201
+ if value.is_a?(Array)
202
+ value.map do |v|
203
+ v.to_hash(downcase: downcase)
204
+ end
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash(downcase: downcase)
211
+ else
212
+ value
213
+ end
214
+ end
215
+
216
+ def parse_date(datestring)
217
+ if datestring.include?('Date')
218
+ date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
219
+ original, date, timezone = *date_pattern.match(datestring)
220
+ date = (date.to_i / 1000)
221
+ Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
222
+ elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
223
+ Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
224
+ else # handle date 'types' for small subset of payroll API's
225
+ Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
226
+ end
227
+ end
228
+ end
229
+ end
@@ -167,6 +167,7 @@ module XeroRuby::Accounting
167
167
  GST_CASHBOOK ||= "GST_CASHBOOK".freeze
168
168
  NON_GST_CASHBOOK ||= "NON_GST_CASHBOOK".freeze
169
169
  ULTIMATE ||= "ULTIMATE".freeze
170
+ LITE ||= "LITE".freeze
170
171
 
171
172
  # BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing)
172
173
  attr_accessor :edition
@@ -462,7 +463,7 @@ module XeroRuby::Accounting
462
463
  return false unless sales_tax_period_validator.valid?(@sales_tax_period)
463
464
  organisation_entity_type_validator = EnumAttributeValidator.new('String', ["ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "INDIVIDUAL", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST"])
464
465
  return false unless organisation_entity_type_validator.valid?(@organisation_entity_type)
465
- _class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE"])
466
+ _class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE"])
466
467
  return false unless _class_validator.valid?(@_class)
467
468
  edition_validator = EnumAttributeValidator.new('String', ["BUSINESS", "PARTNER"])
468
469
  return false unless edition_validator.valid?(@edition)
@@ -522,7 +523,7 @@ module XeroRuby::Accounting
522
523
  # Custom attribute writer method checking allowed values (enum).
523
524
  # @param [Object] _class Object to be assigned
524
525
  def _class=(_class)
525
- validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE"])
526
+ validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE"])
526
527
  unless validator.valid?(_class)
527
528
  fail ArgumentError, "invalid value for \"_class\", must be one of #{validator.allowable_values}."
528
529
  end
@@ -63,12 +63,24 @@ module XeroRuby::Accounting
63
63
  # Xero generated unique identifier for repeating invoice template
64
64
  attr_accessor :id
65
65
 
66
- # boolean to indicate if an invoice has an attachment
66
+ # Boolean to indicate if an invoice has an attachment
67
67
  attr_accessor :has_attachments
68
68
 
69
69
  # Displays array of attachments from the API
70
70
  attr_accessor :attachments
71
71
 
72
+ # Boolean to indicate whether the invoice has been approved for sending
73
+ attr_accessor :approved_for_sending
74
+
75
+ # Boolean to indicate whether a copy is sent to sender's email
76
+ attr_accessor :send_copy
77
+
78
+ # Boolean to indicate whether the invoice in the Xero app displays as \"sent\"
79
+ attr_accessor :mark_as_sent
80
+
81
+ # Boolean to indicate whether to include PDF attachment
82
+ attr_accessor :include_pdf
83
+
72
84
  class EnumAttributeValidator
73
85
  attr_reader :datatype
74
86
  attr_reader :allowable_values
@@ -109,7 +121,11 @@ module XeroRuby::Accounting
109
121
  :'repeating_invoice_id' => :'RepeatingInvoiceID',
110
122
  :'id' => :'ID',
111
123
  :'has_attachments' => :'HasAttachments',
112
- :'attachments' => :'Attachments'
124
+ :'attachments' => :'Attachments',
125
+ :'approved_for_sending' => :'ApprovedForSending',
126
+ :'send_copy' => :'SendCopy',
127
+ :'mark_as_sent' => :'MarkAsSent',
128
+ :'include_pdf' => :'IncludePDF'
113
129
  }
114
130
  end
115
131
 
@@ -131,7 +147,11 @@ module XeroRuby::Accounting
131
147
  :'repeating_invoice_id' => :'String',
132
148
  :'id' => :'String',
133
149
  :'has_attachments' => :'Boolean',
134
- :'attachments' => :'Array<Attachment>'
150
+ :'attachments' => :'Array<Attachment>',
151
+ :'approved_for_sending' => :'Boolean',
152
+ :'send_copy' => :'Boolean',
153
+ :'mark_as_sent' => :'Boolean',
154
+ :'include_pdf' => :'Boolean'
135
155
  }
136
156
  end
137
157
 
@@ -219,6 +239,30 @@ module XeroRuby::Accounting
219
239
  self.attachments = value
220
240
  end
221
241
  end
242
+
243
+ if attributes.key?(:'approved_for_sending')
244
+ self.approved_for_sending = attributes[:'approved_for_sending']
245
+ else
246
+ self.approved_for_sending = false
247
+ end
248
+
249
+ if attributes.key?(:'send_copy')
250
+ self.send_copy = attributes[:'send_copy']
251
+ else
252
+ self.send_copy = false
253
+ end
254
+
255
+ if attributes.key?(:'mark_as_sent')
256
+ self.mark_as_sent = attributes[:'mark_as_sent']
257
+ else
258
+ self.mark_as_sent = false
259
+ end
260
+
261
+ if attributes.key?(:'include_pdf')
262
+ self.include_pdf = attributes[:'include_pdf']
263
+ else
264
+ self.include_pdf = false
265
+ end
222
266
  end
223
267
 
224
268
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -278,7 +322,11 @@ module XeroRuby::Accounting
278
322
  repeating_invoice_id == o.repeating_invoice_id &&
279
323
  id == o.id &&
280
324
  has_attachments == o.has_attachments &&
281
- attachments == o.attachments
325
+ attachments == o.attachments &&
326
+ approved_for_sending == o.approved_for_sending &&
327
+ send_copy == o.send_copy &&
328
+ mark_as_sent == o.mark_as_sent &&
329
+ include_pdf == o.include_pdf
282
330
  end
283
331
 
284
332
  # @see the `==` method
@@ -290,7 +338,7 @@ module XeroRuby::Accounting
290
338
  # Calculates hash code according to all attributes.
291
339
  # @return [Integer] Hash code
292
340
  def hash
293
- [type, contact, schedule, line_items, line_amount_types, reference, branding_theme_id, currency_code, status, sub_total, total_tax, total, repeating_invoice_id, id, has_attachments, attachments].hash
341
+ [type, contact, schedule, line_items, line_amount_types, reference, branding_theme_id, currency_code, status, sub_total, total_tax, total, repeating_invoice_id, id, has_attachments, attachments, approved_for_sending, send_copy, mark_as_sent, include_pdf].hash
294
342
  end
295
343
 
296
344
  # Builds the object from hash
@@ -115,6 +115,7 @@ module XeroRuby::Accounting
115
115
  TXRCN33_INPUT ||= "TXRCN33INPUT".freeze
116
116
  TXRCREINPUT ||= "TXRCREINPUT".freeze
117
117
  TXRCESSINPUT ||= "TXRCESSINPUT".freeze
118
+ TXRCTSINPUT ||= "TXRCTSINPUT".freeze
118
119
 
119
120
  # Boolean to describe if tax rate can be used for asset accounts i.e. true,false
120
121
  attr_accessor :can_apply_to_assets
@@ -273,7 +274,7 @@ module XeroRuby::Accounting
273
274
  def valid?
274
275
  status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "DELETED", "ARCHIVED", "PENDING"])
275
276
  return false unless status_validator.valid?(@status)
276
- report_tax_type_validator = EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33INPUT", "TXRCREINPUT", "TXRCESSINPUT"])
277
+ report_tax_type_validator = EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33INPUT", "TXRCREINPUT", "TXRCESSINPUT", "TXRCTSINPUT"])
277
278
  return false unless report_tax_type_validator.valid?(@report_tax_type)
278
279
  true
279
280
  end
@@ -291,7 +292,7 @@ module XeroRuby::Accounting
291
292
  # Custom attribute writer method checking allowed values (enum).
292
293
  # @param [Object] report_tax_type Object to be assigned
293
294
  def report_tax_type=(report_tax_type)
294
- validator = EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33INPUT", "TXRCREINPUT", "TXRCESSINPUT"])
295
+ validator = EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33INPUT", "TXRCREINPUT", "TXRCESSINPUT", "TXRCTSINPUT"])
295
296
  unless validator.valid?(report_tax_type)
296
297
  fail ArgumentError, "invalid value for \"report_tax_type\", must be one of #{validator.allowable_values}."
297
298
  end
@@ -80,6 +80,7 @@ module XeroRuby::Accounting
80
80
  TXRCN33_INPUT ||= "TXRCN33INPUT".freeze
81
81
  TXRCREINPUT ||= "TXRCREINPUT".freeze
82
82
  TXRCESSINPUT ||= "TXRCESSINPUT".freeze
83
+ TXRCTSINPUT ||= "TXRCTSINPUT".freeze
83
84
 
84
85
  # Builds the enum from string
85
86
  # @param [String] The enum value in the form of the string
@@ -26,6 +26,8 @@ module XeroRuby::PayrollAu
26
26
  LUMPSUME ||= "LUMPSUME".freeze
27
27
  LUMPSUMW ||= "LUMPSUMW".freeze
28
28
  DIRECTORSFEES ||= "DIRECTORSFEES".freeze
29
+ PAIDPARENTALLEAVE ||= "PAIDPARENTALLEAVE".freeze
30
+ WORKERSCOMPENSATION ||= "WORKERSCOMPENSATION".freeze
29
31
 
30
32
  # Builds the enum from string
31
33
  # @param [String] The enum value in the form of the string
@@ -40,7 +40,7 @@ module XeroRuby::PayrollAu
40
40
  # The email address for the employee
41
41
  attr_accessor :email
42
42
 
43
- # The employee’s gender. See Employee Gender
43
+ # The employee’s gender. See Employee Gender
44
44
  attr_accessor :gender
45
45
  N ||= "N".freeze
46
46
  M ||= "M".freeze
@@ -0,0 +1,46 @@
1
+ =begin
2
+ #Xero Payroll AU API
3
+
4
+ #This is the Xero Payroll API for orgs in Australia region.
5
+
6
+ Contact: api@xero.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 4.3.1
9
+
10
+ =end
11
+
12
+ require 'time'
13
+ require 'date'
14
+
15
+ module XeroRuby::PayrollAu
16
+ class LeaveCategoryCode
17
+ ANNUALLEAVE ||= "ANNUALLEAVE".freeze
18
+ LONGSERVICELEAVE ||= "LONGSERVICELEAVE".freeze
19
+ PERSONALCARERSLEAVE ||= "PERSONALCARERSLEAVE".freeze
20
+ ROSTEREDDAYOFF ||= "ROSTEREDDAYOFF".freeze
21
+ TIMEOFFINLIEU ||= "TIMEOFFINLIEU".freeze
22
+ COMPASSIONATEANDBEREAVEMENTLEAVE ||= "COMPASSIONATEANDBEREAVEMENTLEAVE".freeze
23
+ STUDYLEAVE ||= "STUDYLEAVE".freeze
24
+ FAMILYANDDOMESTICVIOLENCELEAVE ||= "FAMILYANDDOMESTICVIOLENCELEAVE".freeze
25
+ SPECIALPAIDLEAVE ||= "SPECIALPAIDLEAVE".freeze
26
+ COMMUNITYSERVICELEAVE ||= "COMMUNITYSERVICELEAVE".freeze
27
+ JURYDUTYLEAVE ||= "JURYDUTYLEAVE".freeze
28
+ DEFENCERESERVELEAVE ||= "DEFENCERESERVELEAVE".freeze
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def self.build_from_hash(value)
34
+ new.build_from_hash(value)
35
+ end
36
+
37
+ # Builds the enum from string
38
+ # @param [String] The enum value in the form of the string
39
+ # @return [String] The enum value
40
+ def build_from_hash(value)
41
+ constantValues = LeaveCategoryCode.constants.select { |c| LeaveCategoryCode::const_get(c) == value }
42
+ raise "Invalid ENUM value #{value} for class #LeaveCategoryCode" if constantValues.empty?
43
+ value
44
+ end
45
+ end
46
+ end
@@ -43,6 +43,12 @@ module XeroRuby::PayrollAu
43
43
  # Is the current record
44
44
  attr_accessor :current_record
45
45
 
46
+
47
+ attr_accessor :leave_category_code
48
+
49
+ # Set this to indicate that the leave type is exempt from superannuation guarantee contribution
50
+ attr_accessor :sgc_exempt
51
+
46
52
  # Attribute mapping from ruby-style variable name to JSON key.
47
53
  def self.attribute_map
48
54
  {
@@ -54,7 +60,9 @@ module XeroRuby::PayrollAu
54
60
  :'updated_date_utc' => :'UpdatedDateUTC',
55
61
  :'is_paid_leave' => :'IsPaidLeave',
56
62
  :'show_on_payslip' => :'ShowOnPayslip',
57
- :'current_record' => :'CurrentRecord'
63
+ :'current_record' => :'CurrentRecord',
64
+ :'leave_category_code' => :'LeaveCategoryCode',
65
+ :'sgc_exempt' => :'SGCExempt'
58
66
  }
59
67
  end
60
68
 
@@ -69,7 +77,9 @@ module XeroRuby::PayrollAu
69
77
  :'updated_date_utc' => :'DateTime',
70
78
  :'is_paid_leave' => :'Boolean',
71
79
  :'show_on_payslip' => :'Boolean',
72
- :'current_record' => :'Boolean'
80
+ :'current_record' => :'Boolean',
81
+ :'leave_category_code' => :'LeaveCategoryCode',
82
+ :'sgc_exempt' => :'Boolean'
73
83
  }
74
84
  end
75
85
 
@@ -123,6 +133,14 @@ module XeroRuby::PayrollAu
123
133
  if attributes.key?(:'current_record')
124
134
  self.current_record = attributes[:'current_record']
125
135
  end
136
+
137
+ if attributes.key?(:'leave_category_code')
138
+ self.leave_category_code = attributes[:'leave_category_code']
139
+ end
140
+
141
+ if attributes.key?(:'sgc_exempt')
142
+ self.sgc_exempt = attributes[:'sgc_exempt']
143
+ end
126
144
  end
127
145
 
128
146
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -166,7 +184,9 @@ module XeroRuby::PayrollAu
166
184
  updated_date_utc == o.updated_date_utc &&
167
185
  is_paid_leave == o.is_paid_leave &&
168
186
  show_on_payslip == o.show_on_payslip &&
169
- current_record == o.current_record
187
+ current_record == o.current_record &&
188
+ leave_category_code == o.leave_category_code &&
189
+ sgc_exempt == o.sgc_exempt
170
190
  end
171
191
 
172
192
  # @see the `==` method
@@ -178,7 +198,7 @@ module XeroRuby::PayrollAu
178
198
  # Calculates hash code according to all attributes.
179
199
  # @return [Integer] Hash code
180
200
  def hash
181
- [name, type_of_units, leave_type_id, normal_entitlement, leave_loading_rate, updated_date_utc, is_paid_leave, show_on_payslip, current_record].hash
201
+ [name, type_of_units, leave_type_id, normal_entitlement, leave_loading_rate, updated_date_utc, is_paid_leave, show_on_payslip, current_record, leave_category_code, sgc_exempt].hash
182
202
  end
183
203
 
184
204
  # Builds the object from hash
@@ -61,6 +61,9 @@ module XeroRuby::PayrollAu
61
61
  # If the employee is eligible for student startup loan rules
62
62
  attr_accessor :has_student_startup_loan
63
63
 
64
+ # If the employee has any of the following loans or debts: Higher Education Loan Program (HELP/HECS), VET Student Loan (VSL), Financial Supplement (FS), Student Start-up Loan (SSL), or Trade Support Loan (TSL)
65
+ attr_accessor :has_loan_or_student_debt
66
+
64
67
  # Last modified timestamp
65
68
  attr_accessor :updated_date_utc
66
69
 
@@ -82,6 +85,7 @@ module XeroRuby::PayrollAu
82
85
  :'eligible_to_receive_leave_loading' => :'EligibleToReceiveLeaveLoading',
83
86
  :'approved_withholding_variation_percentage' => :'ApprovedWithholdingVariationPercentage',
84
87
  :'has_student_startup_loan' => :'HasStudentStartupLoan',
88
+ :'has_loan_or_student_debt' => :'HasLoanOrStudentDebt',
85
89
  :'updated_date_utc' => :'UpdatedDateUTC'
86
90
  }
87
91
  end
@@ -104,6 +108,7 @@ module XeroRuby::PayrollAu
104
108
  :'eligible_to_receive_leave_loading' => :'Boolean',
105
109
  :'approved_withholding_variation_percentage' => :'Float',
106
110
  :'has_student_startup_loan' => :'Boolean',
111
+ :'has_loan_or_student_debt' => :'Boolean',
107
112
  :'updated_date_utc' => :'DateTime'
108
113
  }
109
114
  end
@@ -183,6 +188,10 @@ module XeroRuby::PayrollAu
183
188
  self.has_student_startup_loan = attributes[:'has_student_startup_loan']
184
189
  end
185
190
 
191
+ if attributes.key?(:'has_loan_or_student_debt')
192
+ self.has_loan_or_student_debt = attributes[:'has_loan_or_student_debt']
193
+ end
194
+
186
195
  if attributes.key?(:'updated_date_utc')
187
196
  self.updated_date_utc = attributes[:'updated_date_utc']
188
197
  end
@@ -221,6 +230,7 @@ module XeroRuby::PayrollAu
221
230
  eligible_to_receive_leave_loading == o.eligible_to_receive_leave_loading &&
222
231
  approved_withholding_variation_percentage == o.approved_withholding_variation_percentage &&
223
232
  has_student_startup_loan == o.has_student_startup_loan &&
233
+ has_loan_or_student_debt == o.has_loan_or_student_debt &&
224
234
  updated_date_utc == o.updated_date_utc
225
235
  end
226
236
 
@@ -233,7 +243,7 @@ module XeroRuby::PayrollAu
233
243
  # Calculates hash code according to all attributes.
234
244
  # @return [Integer] Hash code
235
245
  def hash
236
- [employee_id, employment_basis, tfn_exemption_type, tax_file_number, australian_resident_for_tax_purposes, residency_status, tax_free_threshold_claimed, tax_offset_estimated_amount, has_help_debt, has_sfss_debt, has_trade_support_loan_debt, upward_variation_tax_withholding_amount, eligible_to_receive_leave_loading, approved_withholding_variation_percentage, has_student_startup_loan, updated_date_utc].hash
246
+ [employee_id, employment_basis, tfn_exemption_type, tax_file_number, australian_resident_for_tax_purposes, residency_status, tax_free_threshold_claimed, tax_offset_estimated_amount, has_help_debt, has_sfss_debt, has_trade_support_loan_debt, upward_variation_tax_withholding_amount, eligible_to_receive_leave_loading, approved_withholding_variation_percentage, has_student_startup_loan, has_loan_or_student_debt, updated_date_utc].hash
237
247
  end
238
248
 
239
249
  # Builds the object from hash
@@ -114,14 +114,14 @@ module XeroRuby::Projects
114
114
  :'name' => :'String',
115
115
  :'rate' => :'Amount',
116
116
  :'charge_type' => :'ChargeType',
117
- :'estimate_minutes' => :'Float',
117
+ :'estimate_minutes' => :'Integer',
118
118
  :'project_id' => :'String',
119
- :'total_minutes' => :'Float',
119
+ :'total_minutes' => :'Integer',
120
120
  :'total_amount' => :'Amount',
121
- :'minutes_invoiced' => :'Float',
122
- :'minutes_to_be_invoiced' => :'Float',
123
- :'fixed_minutes' => :'Float',
124
- :'non_chargeable_minutes' => :'Float',
121
+ :'minutes_invoiced' => :'Integer',
122
+ :'minutes_to_be_invoiced' => :'Integer',
123
+ :'fixed_minutes' => :'Integer',
124
+ :'non_chargeable_minutes' => :'Integer',
125
125
  :'amount_to_be_invoiced' => :'Amount',
126
126
  :'amount_invoiced' => :'Amount',
127
127
  :'status' => :'String'
@@ -25,7 +25,7 @@ module XeroRuby::Projects
25
25
 
26
26
  attr_accessor :charge_type
27
27
 
28
- # Estimated time to perform the task. EstimateMinutes has to be greater than 0 if provided.
28
+ # An estimated time to perform the task
29
29
  attr_accessor :estimate_minutes
30
30
 
31
31
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -7,9 +7,9 @@ Contact: api@xero.com
7
7
  Generated by: https://openapi-generator.tech
8
8
  OpenAPI Generator version: 4.3.1
9
9
 
10
- The version of the XeroOpenAPI document: 2.22.4
10
+ The version of the XeroOpenAPI document: 2.27.0
11
11
  =end
12
12
 
13
13
  module XeroRuby
14
- VERSION = '3.9.0'
14
+ VERSION = '3.12.0'
15
15
  end
data/lib/xero-ruby.rb CHANGED
@@ -292,6 +292,7 @@ require 'xero-ruby/models/payroll_au/leave_accrual_line'
292
292
  require 'xero-ruby/models/payroll_au/leave_application'
293
293
  require 'xero-ruby/models/payroll_au/leave_applications'
294
294
  require 'xero-ruby/models/payroll_au/leave_balance'
295
+ require 'xero-ruby/models/payroll_au/leave_category_code'
295
296
  require 'xero-ruby/models/payroll_au/leave_earnings_line'
296
297
  require 'xero-ruby/models/payroll_au/leave_line'
297
298
  require 'xero-ruby/models/payroll_au/leave_line_calculation_type'
@@ -405,6 +406,8 @@ require 'xero-ruby/models/accounting/bank_transactions'
405
406
  require 'xero-ruby/models/accounting/bank_transfer'
406
407
  require 'xero-ruby/models/accounting/bank_transfers'
407
408
  require 'xero-ruby/models/accounting/batch_payment'
409
+ require 'xero-ruby/models/accounting/batch_payment_delete'
410
+ require 'xero-ruby/models/accounting/batch_payment_delete_by_url_param'
408
411
  require 'xero-ruby/models/accounting/batch_payment_details'
409
412
  require 'xero-ruby/models/accounting/batch_payments'
410
413
  require 'xero-ruby/models/accounting/bill'