xero-ruby 3.8.0 → 3.11.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.
- checksums.yaml +4 -4
- data/lib/xero-ruby/api/accounting_api.rb +478 -0
- data/lib/xero-ruby/api/project_api.rb +263 -0
- data/lib/xero-ruby/models/accounting/batch_payment_delete.rb +244 -0
- data/lib/xero-ruby/models/accounting/batch_payment_delete_by_url_param.rb +229 -0
- data/lib/xero-ruby/models/accounting/organisation.rb +3 -2
- data/lib/xero-ruby/models/accounting/repeating_invoice.rb +53 -5
- data/lib/xero-ruby/models/accounting/tax_rate.rb +10 -2
- data/lib/xero-ruby/models/accounting/tax_type.rb +8 -0
- data/lib/xero-ruby/models/finance/statement_response.rb +22 -2
- data/lib/xero-ruby/models/payroll_au/earnings_type.rb +2 -0
- data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +11 -1
- data/lib/xero-ruby/models/projects/task.rb +6 -6
- data/lib/xero-ruby/models/projects/task_create_or_update.rb +1 -1
- data/lib/xero-ruby/version.rb +2 -2
- data/lib/xero-ruby.rb +2 -0
- metadata +4 -2
@@ -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
|
@@ -166,6 +166,7 @@ module XeroRuby::Accounting
|
|
166
166
|
LEDGER ||= "LEDGER".freeze
|
167
167
|
GST_CASHBOOK ||= "GST_CASHBOOK".freeze
|
168
168
|
NON_GST_CASHBOOK ||= "NON_GST_CASHBOOK".freeze
|
169
|
+
ULTIMATE ||= "ULTIMATE".freeze
|
169
170
|
|
170
171
|
# BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing)
|
171
172
|
attr_accessor :edition
|
@@ -461,7 +462,7 @@ module XeroRuby::Accounting
|
|
461
462
|
return false unless sales_tax_period_validator.valid?(@sales_tax_period)
|
462
463
|
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"])
|
463
464
|
return false unless organisation_entity_type_validator.valid?(@organisation_entity_type)
|
464
|
-
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK"])
|
465
|
+
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE"])
|
465
466
|
return false unless _class_validator.valid?(@_class)
|
466
467
|
edition_validator = EnumAttributeValidator.new('String', ["BUSINESS", "PARTNER"])
|
467
468
|
return false unless edition_validator.valid?(@edition)
|
@@ -521,7 +522,7 @@ module XeroRuby::Accounting
|
|
521
522
|
# Custom attribute writer method checking allowed values (enum).
|
522
523
|
# @param [Object] _class Object to be assigned
|
523
524
|
def _class=(_class)
|
524
|
-
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK"])
|
525
|
+
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE"])
|
525
526
|
unless validator.valid?(_class)
|
526
527
|
fail ArgumentError, "invalid value for \"_class\", must be one of #{validator.allowable_values}."
|
527
528
|
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
|
-
#
|
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
|
@@ -108,6 +108,14 @@ module XeroRuby::Accounting
|
|
108
108
|
ZRINPUT ||= "ZRINPUT".freeze
|
109
109
|
BADDEBT ||= "BADDEBT".freeze
|
110
110
|
OTHERINPUT ||= "OTHERINPUT".freeze
|
111
|
+
BADDEBTRELIEF ||= "BADDEBTRELIEF".freeze
|
112
|
+
IGDSINPUT3 ||= "IGDSINPUT3".freeze
|
113
|
+
SROVR ||= "SROVR".freeze
|
114
|
+
TOURISTREFUND ||= "TOURISTREFUND".freeze
|
115
|
+
TXRCN33_INPUT ||= "TXRCN33INPUT".freeze
|
116
|
+
TXRCREINPUT ||= "TXRCREINPUT".freeze
|
117
|
+
TXRCESSINPUT ||= "TXRCESSINPUT".freeze
|
118
|
+
TXRCTSINPUT ||= "TXRCTSINPUT".freeze
|
111
119
|
|
112
120
|
# Boolean to describe if tax rate can be used for asset accounts i.e. true,false
|
113
121
|
attr_accessor :can_apply_to_assets
|
@@ -266,7 +274,7 @@ module XeroRuby::Accounting
|
|
266
274
|
def valid?
|
267
275
|
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "DELETED", "ARCHIVED", "PENDING"])
|
268
276
|
return false unless status_validator.valid?(@status)
|
269
|
-
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"])
|
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"])
|
270
278
|
return false unless report_tax_type_validator.valid?(@report_tax_type)
|
271
279
|
true
|
272
280
|
end
|
@@ -284,7 +292,7 @@ module XeroRuby::Accounting
|
|
284
292
|
# Custom attribute writer method checking allowed values (enum).
|
285
293
|
# @param [Object] report_tax_type Object to be assigned
|
286
294
|
def report_tax_type=(report_tax_type)
|
287
|
-
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"])
|
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"])
|
288
296
|
unless validator.valid?(report_tax_type)
|
289
297
|
fail ArgumentError, "invalid value for \"report_tax_type\", must be one of #{validator.allowable_values}."
|
290
298
|
end
|
@@ -73,6 +73,14 @@ module XeroRuby::Accounting
|
|
73
73
|
DRCHARGE20 ||= "DRCHARGE20".freeze
|
74
74
|
DRCHARGESUPPLY5 ||= "DRCHARGESUPPLY5".freeze
|
75
75
|
DRCHARGE5 ||= "DRCHARGE5".freeze
|
76
|
+
BADDEBTRELIEF ||= "BADDEBTRELIEF".freeze
|
77
|
+
IGDSINPUT3 ||= "IGDSINPUT3".freeze
|
78
|
+
SROVR ||= "SROVR".freeze
|
79
|
+
TOURISTREFUND ||= "TOURISTREFUND".freeze
|
80
|
+
TXRCN33_INPUT ||= "TXRCN33INPUT".freeze
|
81
|
+
TXRCREINPUT ||= "TXRCREINPUT".freeze
|
82
|
+
TXRCESSINPUT ||= "TXRCESSINPUT".freeze
|
83
|
+
TXRCTSINPUT ||= "TXRCTSINPUT".freeze
|
76
84
|
|
77
85
|
# Builds the enum from string
|
78
86
|
# @param [String] The enum value in the form of the string
|
@@ -28,9 +28,15 @@ 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
|
-
#
|
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.
|
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.
|
35
|
+
attr_accessor :start_balance
|
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.
|
38
|
+
attr_accessor :end_balance
|
39
|
+
|
34
40
|
# List of statement lines
|
35
41
|
attr_accessor :statement_lines
|
36
42
|
|
@@ -42,6 +48,8 @@ module XeroRuby::Finance
|
|
42
48
|
:'end_date' => :'endDate',
|
43
49
|
:'imported_date_time_utc' => :'importedDateTimeUtc',
|
44
50
|
:'import_source' => :'importSource',
|
51
|
+
:'start_balance' => :'startBalance',
|
52
|
+
:'end_balance' => :'endBalance',
|
45
53
|
:'statement_lines' => :'statementLines'
|
46
54
|
}
|
47
55
|
end
|
@@ -54,6 +62,8 @@ module XeroRuby::Finance
|
|
54
62
|
:'end_date' => :'Date',
|
55
63
|
:'imported_date_time_utc' => :'DateTime',
|
56
64
|
:'import_source' => :'String',
|
65
|
+
:'start_balance' => :'BigDecimal',
|
66
|
+
:'end_balance' => :'BigDecimal',
|
57
67
|
:'statement_lines' => :'Array<StatementLineResponse>'
|
58
68
|
}
|
59
69
|
end
|
@@ -93,6 +103,14 @@ module XeroRuby::Finance
|
|
93
103
|
self.import_source = attributes[:'import_source']
|
94
104
|
end
|
95
105
|
|
106
|
+
if attributes.key?(:'start_balance')
|
107
|
+
self.start_balance = attributes[:'start_balance']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'end_balance')
|
111
|
+
self.end_balance = attributes[:'end_balance']
|
112
|
+
end
|
113
|
+
|
96
114
|
if attributes.key?(:'statement_lines')
|
97
115
|
if (value = attributes[:'statement_lines']).is_a?(Array)
|
98
116
|
self.statement_lines = value
|
@@ -123,6 +141,8 @@ module XeroRuby::Finance
|
|
123
141
|
end_date == o.end_date &&
|
124
142
|
imported_date_time_utc == o.imported_date_time_utc &&
|
125
143
|
import_source == o.import_source &&
|
144
|
+
start_balance == o.start_balance &&
|
145
|
+
end_balance == o.end_balance &&
|
126
146
|
statement_lines == o.statement_lines
|
127
147
|
end
|
128
148
|
|
@@ -135,7 +155,7 @@ module XeroRuby::Finance
|
|
135
155
|
# Calculates hash code according to all attributes.
|
136
156
|
# @return [Integer] Hash code
|
137
157
|
def hash
|
138
|
-
[statement_id, start_date, end_date, imported_date_time_utc, import_source, statement_lines].hash
|
158
|
+
[statement_id, start_date, end_date, imported_date_time_utc, import_source, start_balance, end_balance, statement_lines].hash
|
139
159
|
end
|
140
160
|
|
141
161
|
# Builds the object from hash
|
@@ -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
|
@@ -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' => :'
|
117
|
+
:'estimate_minutes' => :'Integer',
|
118
118
|
:'project_id' => :'String',
|
119
|
-
:'total_minutes' => :'
|
119
|
+
:'total_minutes' => :'Integer',
|
120
120
|
:'total_amount' => :'Amount',
|
121
|
-
:'minutes_invoiced' => :'
|
122
|
-
:'minutes_to_be_invoiced' => :'
|
123
|
-
:'fixed_minutes' => :'
|
124
|
-
:'non_chargeable_minutes' => :'
|
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
|
-
#
|
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.
|
data/lib/xero-ruby/version.rb
CHANGED
@@ -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.
|
10
|
+
The version of the XeroOpenAPI document: 2.25.0
|
11
11
|
=end
|
12
12
|
|
13
13
|
module XeroRuby
|
14
|
-
VERSION = '3.
|
14
|
+
VERSION = '3.11.0'
|
15
15
|
end
|
data/lib/xero-ruby.rb
CHANGED
@@ -405,6 +405,8 @@ require 'xero-ruby/models/accounting/bank_transactions'
|
|
405
405
|
require 'xero-ruby/models/accounting/bank_transfer'
|
406
406
|
require 'xero-ruby/models/accounting/bank_transfers'
|
407
407
|
require 'xero-ruby/models/accounting/batch_payment'
|
408
|
+
require 'xero-ruby/models/accounting/batch_payment_delete'
|
409
|
+
require 'xero-ruby/models/accounting/batch_payment_delete_by_url_param'
|
408
410
|
require 'xero-ruby/models/accounting/batch_payment_details'
|
409
411
|
require 'xero-ruby/models/accounting/batch_payments'
|
410
412
|
require 'xero-ruby/models/accounting/bill'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xero-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xero API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -131,6 +131,8 @@ files:
|
|
131
131
|
- lib/xero-ruby/models/accounting/bank_transfer.rb
|
132
132
|
- lib/xero-ruby/models/accounting/bank_transfers.rb
|
133
133
|
- lib/xero-ruby/models/accounting/batch_payment.rb
|
134
|
+
- lib/xero-ruby/models/accounting/batch_payment_delete.rb
|
135
|
+
- lib/xero-ruby/models/accounting/batch_payment_delete_by_url_param.rb
|
134
136
|
- lib/xero-ruby/models/accounting/batch_payment_details.rb
|
135
137
|
- lib/xero-ruby/models/accounting/batch_payments.rb
|
136
138
|
- lib/xero-ruby/models/accounting/bill.rb
|