xero-ruby 8.0.0 → 9.1.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 +36 -27
- data/lib/xero-ruby/api/payroll_nz_api.rb +330 -7
- data/lib/xero-ruby/models/accounting/bank_transactions.rb +23 -1
- data/lib/xero-ruby/models/accounting/contacts.rb +23 -1
- data/lib/xero-ruby/models/accounting/credit_notes.rb +23 -1
- data/lib/xero-ruby/models/accounting/invoices.rb +23 -1
- data/lib/xero-ruby/models/accounting/journals.rb +13 -1
- data/lib/xero-ruby/models/accounting/manual_journals.rb +23 -1
- data/lib/xero-ruby/models/accounting/organisation.rb +6 -2
- data/lib/xero-ruby/models/accounting/overpayments.rb +23 -1
- data/lib/xero-ruby/models/accounting/{page_info.rb → pagination.rb} +18 -19
- data/lib/xero-ruby/models/accounting/payments.rb +23 -1
- data/lib/xero-ruby/models/accounting/prepayments.rb +23 -1
- data/lib/xero-ruby/models/accounting/purchase_orders.rb +23 -1
- data/lib/xero-ruby/models/payroll_nz/employee.rb +24 -4
- data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +24 -4
- data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +14 -4
- data/lib/xero-ruby/models/payroll_nz/employee_working_pattern.rb +242 -0
- data/lib/xero-ruby/models/{accounting/get_payments_response.rb → payroll_nz/employee_working_pattern_with_working_weeks.rb} +39 -59
- data/lib/xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks_object.rb +242 -0
- data/lib/xero-ruby/models/{accounting/get_invoices_response.rb → payroll_nz/employee_working_pattern_with_working_weeks_request.rb} +32 -62
- data/lib/xero-ruby/models/{accounting/get_contacts_response.rb → payroll_nz/employee_working_patterns_object.rb} +27 -57
- data/lib/xero-ruby/models/payroll_nz/employment.rb +24 -4
- data/lib/xero-ruby/models/payroll_nz/salary_and_wage.rb +28 -4
- data/lib/xero-ruby/models/{accounting/get_manual_journals_response.rb → payroll_nz/working_week.rb} +95 -52
- data/lib/xero-ruby/version.rb +2 -2
- data/lib/xero-ruby.rb +7 -10
- metadata +9 -12
- data/lib/xero-ruby/models/accounting/get_bank_transactions_response.rb +0 -274
- data/lib/xero-ruby/models/accounting/get_credit_notes_response.rb +0 -274
- data/lib/xero-ruby/models/accounting/get_overpayments_response.rb +0 -274
- data/lib/xero-ruby/models/accounting/get_prepayments_response.rb +0 -274
- data/lib/xero-ruby/models/accounting/get_purchase_orders_response.rb +0 -274
@@ -16,12 +16,16 @@ module XeroRuby::Accounting
|
|
16
16
|
require 'bigdecimal'
|
17
17
|
|
18
18
|
class Journals
|
19
|
+
# Displays array of warning messages from the API
|
20
|
+
attr_accessor :warnings
|
21
|
+
|
19
22
|
|
20
23
|
attr_accessor :journals
|
21
24
|
|
22
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
26
|
def self.attribute_map
|
24
27
|
{
|
28
|
+
:'warnings' => :'Warnings',
|
25
29
|
:'journals' => :'Journals'
|
26
30
|
}
|
27
31
|
end
|
@@ -29,6 +33,7 @@ module XeroRuby::Accounting
|
|
29
33
|
# Attribute type mapping.
|
30
34
|
def self.openapi_types
|
31
35
|
{
|
36
|
+
:'warnings' => :'Array<ValidationError>',
|
32
37
|
:'journals' => :'Array<Journal>'
|
33
38
|
}
|
34
39
|
end
|
@@ -48,6 +53,12 @@ module XeroRuby::Accounting
|
|
48
53
|
h[k.to_sym] = v
|
49
54
|
}
|
50
55
|
|
56
|
+
if attributes.key?(:'warnings')
|
57
|
+
if (value = attributes[:'warnings']).is_a?(Array)
|
58
|
+
self.warnings = value
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
51
62
|
if attributes.key?(:'journals')
|
52
63
|
if (value = attributes[:'journals']).is_a?(Array)
|
53
64
|
self.journals = value
|
@@ -73,6 +84,7 @@ module XeroRuby::Accounting
|
|
73
84
|
def ==(o)
|
74
85
|
return true if self.equal?(o)
|
75
86
|
self.class == o.class &&
|
87
|
+
warnings == o.warnings &&
|
76
88
|
journals == o.journals
|
77
89
|
end
|
78
90
|
|
@@ -85,7 +97,7 @@ module XeroRuby::Accounting
|
|
85
97
|
# Calculates hash code according to all attributes.
|
86
98
|
# @return [Integer] Hash code
|
87
99
|
def hash
|
88
|
-
[journals].hash
|
100
|
+
[warnings, journals].hash
|
89
101
|
end
|
90
102
|
|
91
103
|
# Builds the object from hash
|
@@ -17,11 +17,19 @@ module XeroRuby::Accounting
|
|
17
17
|
|
18
18
|
class ManualJournals
|
19
19
|
|
20
|
+
attr_accessor :pagination
|
21
|
+
|
22
|
+
# Displays array of warning messages from the API
|
23
|
+
attr_accessor :warnings
|
24
|
+
|
25
|
+
|
20
26
|
attr_accessor :manual_journals
|
21
27
|
|
22
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
29
|
def self.attribute_map
|
24
30
|
{
|
31
|
+
:'pagination' => :'pagination',
|
32
|
+
:'warnings' => :'Warnings',
|
25
33
|
:'manual_journals' => :'ManualJournals'
|
26
34
|
}
|
27
35
|
end
|
@@ -29,6 +37,8 @@ module XeroRuby::Accounting
|
|
29
37
|
# Attribute type mapping.
|
30
38
|
def self.openapi_types
|
31
39
|
{
|
40
|
+
:'pagination' => :'Pagination',
|
41
|
+
:'warnings' => :'Array<ValidationError>',
|
32
42
|
:'manual_journals' => :'Array<ManualJournal>'
|
33
43
|
}
|
34
44
|
end
|
@@ -48,6 +58,16 @@ module XeroRuby::Accounting
|
|
48
58
|
h[k.to_sym] = v
|
49
59
|
}
|
50
60
|
|
61
|
+
if attributes.key?(:'pagination')
|
62
|
+
self.pagination = attributes[:'pagination']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.key?(:'warnings')
|
66
|
+
if (value = attributes[:'warnings']).is_a?(Array)
|
67
|
+
self.warnings = value
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
51
71
|
if attributes.key?(:'manual_journals')
|
52
72
|
if (value = attributes[:'manual_journals']).is_a?(Array)
|
53
73
|
self.manual_journals = value
|
@@ -73,6 +93,8 @@ module XeroRuby::Accounting
|
|
73
93
|
def ==(o)
|
74
94
|
return true if self.equal?(o)
|
75
95
|
self.class == o.class &&
|
96
|
+
pagination == o.pagination &&
|
97
|
+
warnings == o.warnings &&
|
76
98
|
manual_journals == o.manual_journals
|
77
99
|
end
|
78
100
|
|
@@ -85,7 +107,7 @@ module XeroRuby::Accounting
|
|
85
107
|
# Calculates hash code according to all attributes.
|
86
108
|
# @return [Integer] Hash code
|
87
109
|
def hash
|
88
|
-
[manual_journals].hash
|
110
|
+
[pagination, warnings, manual_journals].hash
|
89
111
|
end
|
90
112
|
|
91
113
|
# Builds the object from hash
|
@@ -168,6 +168,10 @@ module XeroRuby::Accounting
|
|
168
168
|
NON_GST_CASHBOOK ||= "NON_GST_CASHBOOK".freeze
|
169
169
|
ULTIMATE ||= "ULTIMATE".freeze
|
170
170
|
LITE ||= "LITE".freeze
|
171
|
+
ULTIMATE_10 ||= "ULTIMATE_10".freeze
|
172
|
+
ULTIMATE_20 ||= "ULTIMATE_20".freeze
|
173
|
+
ULTIMATE_50 ||= "ULTIMATE_50".freeze
|
174
|
+
ULTIMATE_100 ||= "ULTIMATE_100".freeze
|
171
175
|
IGNITE ||= "IGNITE".freeze
|
172
176
|
GROW ||= "GROW".freeze
|
173
177
|
COMPREHENSIVE ||= "COMPREHENSIVE".freeze
|
@@ -466,7 +470,7 @@ module XeroRuby::Accounting
|
|
466
470
|
return false unless sales_tax_period_validator.valid?(@sales_tax_period)
|
467
471
|
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"])
|
468
472
|
return false unless organisation_entity_type_validator.valid?(@organisation_entity_type)
|
469
|
-
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "IGNITE", "GROW", "COMPREHENSIVE"])
|
473
|
+
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE"])
|
470
474
|
return false unless _class_validator.valid?(@_class)
|
471
475
|
edition_validator = EnumAttributeValidator.new('String', ["BUSINESS", "PARTNER"])
|
472
476
|
return false unless edition_validator.valid?(@edition)
|
@@ -526,7 +530,7 @@ module XeroRuby::Accounting
|
|
526
530
|
# Custom attribute writer method checking allowed values (enum).
|
527
531
|
# @param [Object] _class Object to be assigned
|
528
532
|
def _class=(_class)
|
529
|
-
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "IGNITE", "GROW", "COMPREHENSIVE"])
|
533
|
+
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE"])
|
530
534
|
unless validator.valid?(_class)
|
531
535
|
fail ArgumentError, "invalid value for \"_class\", must be one of #{validator.allowable_values}."
|
532
536
|
end
|
@@ -17,11 +17,19 @@ module XeroRuby::Accounting
|
|
17
17
|
|
18
18
|
class Overpayments
|
19
19
|
|
20
|
+
attr_accessor :pagination
|
21
|
+
|
22
|
+
# Displays array of warning messages from the API
|
23
|
+
attr_accessor :warnings
|
24
|
+
|
25
|
+
|
20
26
|
attr_accessor :overpayments
|
21
27
|
|
22
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
29
|
def self.attribute_map
|
24
30
|
{
|
31
|
+
:'pagination' => :'pagination',
|
32
|
+
:'warnings' => :'Warnings',
|
25
33
|
:'overpayments' => :'Overpayments'
|
26
34
|
}
|
27
35
|
end
|
@@ -29,6 +37,8 @@ module XeroRuby::Accounting
|
|
29
37
|
# Attribute type mapping.
|
30
38
|
def self.openapi_types
|
31
39
|
{
|
40
|
+
:'pagination' => :'Pagination',
|
41
|
+
:'warnings' => :'Array<ValidationError>',
|
32
42
|
:'overpayments' => :'Array<Overpayment>'
|
33
43
|
}
|
34
44
|
end
|
@@ -48,6 +58,16 @@ module XeroRuby::Accounting
|
|
48
58
|
h[k.to_sym] = v
|
49
59
|
}
|
50
60
|
|
61
|
+
if attributes.key?(:'pagination')
|
62
|
+
self.pagination = attributes[:'pagination']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.key?(:'warnings')
|
66
|
+
if (value = attributes[:'warnings']).is_a?(Array)
|
67
|
+
self.warnings = value
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
51
71
|
if attributes.key?(:'overpayments')
|
52
72
|
if (value = attributes[:'overpayments']).is_a?(Array)
|
53
73
|
self.overpayments = value
|
@@ -73,6 +93,8 @@ module XeroRuby::Accounting
|
|
73
93
|
def ==(o)
|
74
94
|
return true if self.equal?(o)
|
75
95
|
self.class == o.class &&
|
96
|
+
pagination == o.pagination &&
|
97
|
+
warnings == o.warnings &&
|
76
98
|
overpayments == o.overpayments
|
77
99
|
end
|
78
100
|
|
@@ -85,7 +107,7 @@ module XeroRuby::Accounting
|
|
85
107
|
# Calculates hash code according to all attributes.
|
86
108
|
# @return [Integer] Hash code
|
87
109
|
def hash
|
88
|
-
[overpayments].hash
|
110
|
+
[pagination, warnings, overpayments].hash
|
89
111
|
end
|
90
112
|
|
91
113
|
# Builds the object from hash
|
@@ -13,10 +13,9 @@ require 'time'
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module XeroRuby::Accounting
|
16
|
-
# Pagination information
|
17
16
|
require 'bigdecimal'
|
18
17
|
|
19
|
-
class
|
18
|
+
class Pagination
|
20
19
|
|
21
20
|
attr_accessor :page
|
22
21
|
|
@@ -24,18 +23,18 @@ module XeroRuby::Accounting
|
|
24
23
|
attr_accessor :page_size
|
25
24
|
|
26
25
|
|
27
|
-
attr_accessor :
|
26
|
+
attr_accessor :page_count
|
28
27
|
|
29
28
|
|
30
|
-
attr_accessor :
|
29
|
+
attr_accessor :item_count
|
31
30
|
|
32
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
32
|
def self.attribute_map
|
34
33
|
{
|
35
|
-
:'page' => :'
|
36
|
-
:'page_size' => :'
|
37
|
-
:'
|
38
|
-
:'
|
34
|
+
:'page' => :'page',
|
35
|
+
:'page_size' => :'pageSize',
|
36
|
+
:'page_count' => :'pageCount',
|
37
|
+
:'item_count' => :'itemCount'
|
39
38
|
}
|
40
39
|
end
|
41
40
|
|
@@ -44,8 +43,8 @@ module XeroRuby::Accounting
|
|
44
43
|
{
|
45
44
|
:'page' => :'Integer',
|
46
45
|
:'page_size' => :'Integer',
|
47
|
-
:'
|
48
|
-
:'
|
46
|
+
:'page_count' => :'Integer',
|
47
|
+
:'item_count' => :'Integer'
|
49
48
|
}
|
50
49
|
end
|
51
50
|
|
@@ -53,13 +52,13 @@ module XeroRuby::Accounting
|
|
53
52
|
# @param [Hash] attributes Model attributes in the form of hash
|
54
53
|
def initialize(attributes = {})
|
55
54
|
if (!attributes.is_a?(Hash))
|
56
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::Pagination` initialize method"
|
57
56
|
end
|
58
57
|
|
59
58
|
# check to see if the attribute exists and convert string to symbol for hash key
|
60
59
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
60
|
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::Pagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
63
62
|
end
|
64
63
|
h[k.to_sym] = v
|
65
64
|
}
|
@@ -72,12 +71,12 @@ module XeroRuby::Accounting
|
|
72
71
|
self.page_size = attributes[:'page_size']
|
73
72
|
end
|
74
73
|
|
75
|
-
if attributes.key?(:'
|
76
|
-
self.
|
74
|
+
if attributes.key?(:'page_count')
|
75
|
+
self.page_count = attributes[:'page_count']
|
77
76
|
end
|
78
77
|
|
79
|
-
if attributes.key?(:'
|
80
|
-
self.
|
78
|
+
if attributes.key?(:'item_count')
|
79
|
+
self.item_count = attributes[:'item_count']
|
81
80
|
end
|
82
81
|
end
|
83
82
|
|
@@ -101,8 +100,8 @@ module XeroRuby::Accounting
|
|
101
100
|
self.class == o.class &&
|
102
101
|
page == o.page &&
|
103
102
|
page_size == o.page_size &&
|
104
|
-
|
105
|
-
|
103
|
+
page_count == o.page_count &&
|
104
|
+
item_count == o.item_count
|
106
105
|
end
|
107
106
|
|
108
107
|
# @see the `==` method
|
@@ -114,7 +113,7 @@ module XeroRuby::Accounting
|
|
114
113
|
# Calculates hash code according to all attributes.
|
115
114
|
# @return [Integer] Hash code
|
116
115
|
def hash
|
117
|
-
[page, page_size,
|
116
|
+
[page, page_size, page_count, item_count].hash
|
118
117
|
end
|
119
118
|
|
120
119
|
# Builds the object from hash
|
@@ -17,11 +17,19 @@ module XeroRuby::Accounting
|
|
17
17
|
|
18
18
|
class Payments
|
19
19
|
|
20
|
+
attr_accessor :pagination
|
21
|
+
|
22
|
+
# Displays array of warning messages from the API
|
23
|
+
attr_accessor :warnings
|
24
|
+
|
25
|
+
|
20
26
|
attr_accessor :payments
|
21
27
|
|
22
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
29
|
def self.attribute_map
|
24
30
|
{
|
31
|
+
:'pagination' => :'pagination',
|
32
|
+
:'warnings' => :'Warnings',
|
25
33
|
:'payments' => :'Payments'
|
26
34
|
}
|
27
35
|
end
|
@@ -29,6 +37,8 @@ module XeroRuby::Accounting
|
|
29
37
|
# Attribute type mapping.
|
30
38
|
def self.openapi_types
|
31
39
|
{
|
40
|
+
:'pagination' => :'Pagination',
|
41
|
+
:'warnings' => :'Array<ValidationError>',
|
32
42
|
:'payments' => :'Array<Payment>'
|
33
43
|
}
|
34
44
|
end
|
@@ -48,6 +58,16 @@ module XeroRuby::Accounting
|
|
48
58
|
h[k.to_sym] = v
|
49
59
|
}
|
50
60
|
|
61
|
+
if attributes.key?(:'pagination')
|
62
|
+
self.pagination = attributes[:'pagination']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.key?(:'warnings')
|
66
|
+
if (value = attributes[:'warnings']).is_a?(Array)
|
67
|
+
self.warnings = value
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
51
71
|
if attributes.key?(:'payments')
|
52
72
|
if (value = attributes[:'payments']).is_a?(Array)
|
53
73
|
self.payments = value
|
@@ -73,6 +93,8 @@ module XeroRuby::Accounting
|
|
73
93
|
def ==(o)
|
74
94
|
return true if self.equal?(o)
|
75
95
|
self.class == o.class &&
|
96
|
+
pagination == o.pagination &&
|
97
|
+
warnings == o.warnings &&
|
76
98
|
payments == o.payments
|
77
99
|
end
|
78
100
|
|
@@ -85,7 +107,7 @@ module XeroRuby::Accounting
|
|
85
107
|
# Calculates hash code according to all attributes.
|
86
108
|
# @return [Integer] Hash code
|
87
109
|
def hash
|
88
|
-
[payments].hash
|
110
|
+
[pagination, warnings, payments].hash
|
89
111
|
end
|
90
112
|
|
91
113
|
# Builds the object from hash
|
@@ -17,11 +17,19 @@ module XeroRuby::Accounting
|
|
17
17
|
|
18
18
|
class Prepayments
|
19
19
|
|
20
|
+
attr_accessor :pagination
|
21
|
+
|
22
|
+
# Displays array of warning messages from the API
|
23
|
+
attr_accessor :warnings
|
24
|
+
|
25
|
+
|
20
26
|
attr_accessor :prepayments
|
21
27
|
|
22
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
29
|
def self.attribute_map
|
24
30
|
{
|
31
|
+
:'pagination' => :'pagination',
|
32
|
+
:'warnings' => :'Warnings',
|
25
33
|
:'prepayments' => :'Prepayments'
|
26
34
|
}
|
27
35
|
end
|
@@ -29,6 +37,8 @@ module XeroRuby::Accounting
|
|
29
37
|
# Attribute type mapping.
|
30
38
|
def self.openapi_types
|
31
39
|
{
|
40
|
+
:'pagination' => :'Pagination',
|
41
|
+
:'warnings' => :'Array<ValidationError>',
|
32
42
|
:'prepayments' => :'Array<Prepayment>'
|
33
43
|
}
|
34
44
|
end
|
@@ -48,6 +58,16 @@ module XeroRuby::Accounting
|
|
48
58
|
h[k.to_sym] = v
|
49
59
|
}
|
50
60
|
|
61
|
+
if attributes.key?(:'pagination')
|
62
|
+
self.pagination = attributes[:'pagination']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.key?(:'warnings')
|
66
|
+
if (value = attributes[:'warnings']).is_a?(Array)
|
67
|
+
self.warnings = value
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
51
71
|
if attributes.key?(:'prepayments')
|
52
72
|
if (value = attributes[:'prepayments']).is_a?(Array)
|
53
73
|
self.prepayments = value
|
@@ -73,6 +93,8 @@ module XeroRuby::Accounting
|
|
73
93
|
def ==(o)
|
74
94
|
return true if self.equal?(o)
|
75
95
|
self.class == o.class &&
|
96
|
+
pagination == o.pagination &&
|
97
|
+
warnings == o.warnings &&
|
76
98
|
prepayments == o.prepayments
|
77
99
|
end
|
78
100
|
|
@@ -85,7 +107,7 @@ module XeroRuby::Accounting
|
|
85
107
|
# Calculates hash code according to all attributes.
|
86
108
|
# @return [Integer] Hash code
|
87
109
|
def hash
|
88
|
-
[prepayments].hash
|
110
|
+
[pagination, warnings, prepayments].hash
|
89
111
|
end
|
90
112
|
|
91
113
|
# Builds the object from hash
|
@@ -17,11 +17,19 @@ module XeroRuby::Accounting
|
|
17
17
|
|
18
18
|
class PurchaseOrders
|
19
19
|
|
20
|
+
attr_accessor :pagination
|
21
|
+
|
22
|
+
# Displays array of warning messages from the API
|
23
|
+
attr_accessor :warnings
|
24
|
+
|
25
|
+
|
20
26
|
attr_accessor :purchase_orders
|
21
27
|
|
22
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
29
|
def self.attribute_map
|
24
30
|
{
|
31
|
+
:'pagination' => :'pagination',
|
32
|
+
:'warnings' => :'Warnings',
|
25
33
|
:'purchase_orders' => :'PurchaseOrders'
|
26
34
|
}
|
27
35
|
end
|
@@ -29,6 +37,8 @@ module XeroRuby::Accounting
|
|
29
37
|
# Attribute type mapping.
|
30
38
|
def self.openapi_types
|
31
39
|
{
|
40
|
+
:'pagination' => :'Pagination',
|
41
|
+
:'warnings' => :'Array<ValidationError>',
|
32
42
|
:'purchase_orders' => :'Array<PurchaseOrder>'
|
33
43
|
}
|
34
44
|
end
|
@@ -48,6 +58,16 @@ module XeroRuby::Accounting
|
|
48
58
|
h[k.to_sym] = v
|
49
59
|
}
|
50
60
|
|
61
|
+
if attributes.key?(:'pagination')
|
62
|
+
self.pagination = attributes[:'pagination']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.key?(:'warnings')
|
66
|
+
if (value = attributes[:'warnings']).is_a?(Array)
|
67
|
+
self.warnings = value
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
51
71
|
if attributes.key?(:'purchase_orders')
|
52
72
|
if (value = attributes[:'purchase_orders']).is_a?(Array)
|
53
73
|
self.purchase_orders = value
|
@@ -73,6 +93,8 @@ module XeroRuby::Accounting
|
|
73
93
|
def ==(o)
|
74
94
|
return true if self.equal?(o)
|
75
95
|
self.class == o.class &&
|
96
|
+
pagination == o.pagination &&
|
97
|
+
warnings == o.warnings &&
|
76
98
|
purchase_orders == o.purchase_orders
|
77
99
|
end
|
78
100
|
|
@@ -85,7 +107,7 @@ module XeroRuby::Accounting
|
|
85
107
|
# Calculates hash code according to all attributes.
|
86
108
|
# @return [Integer] Hash code
|
87
109
|
def hash
|
88
|
-
[purchase_orders].hash
|
110
|
+
[pagination, warnings, purchase_orders].hash
|
89
111
|
end
|
90
112
|
|
91
113
|
# Builds the object from hash
|
@@ -63,6 +63,12 @@ module XeroRuby::PayrollNz
|
|
63
63
|
# Employee's job title
|
64
64
|
attr_accessor :job_title
|
65
65
|
|
66
|
+
# Engagement type of the employee
|
67
|
+
attr_accessor :engagement_type
|
68
|
+
|
69
|
+
# End date for an employee with a fixed-term engagement type
|
70
|
+
attr_accessor :fixed_term_end_date
|
71
|
+
|
66
72
|
class EnumAttributeValidator
|
67
73
|
attr_reader :datatype
|
68
74
|
attr_reader :allowable_values
|
@@ -102,7 +108,9 @@ module XeroRuby::PayrollNz
|
|
102
108
|
:'payroll_calendar_id' => :'payrollCalendarID',
|
103
109
|
:'updated_date_utc' => :'updatedDateUTC',
|
104
110
|
:'created_date_utc' => :'createdDateUTC',
|
105
|
-
:'job_title' => :'jobTitle'
|
111
|
+
:'job_title' => :'jobTitle',
|
112
|
+
:'engagement_type' => :'engagementType',
|
113
|
+
:'fixed_term_end_date' => :'fixedTermEndDate'
|
106
114
|
}
|
107
115
|
end
|
108
116
|
|
@@ -123,7 +131,9 @@ module XeroRuby::PayrollNz
|
|
123
131
|
:'payroll_calendar_id' => :'String',
|
124
132
|
:'updated_date_utc' => :'DateTime',
|
125
133
|
:'created_date_utc' => :'DateTime',
|
126
|
-
:'job_title' => :'String'
|
134
|
+
:'job_title' => :'String',
|
135
|
+
:'engagement_type' => :'String',
|
136
|
+
:'fixed_term_end_date' => :'Date'
|
127
137
|
}
|
128
138
|
end
|
129
139
|
|
@@ -201,6 +211,14 @@ module XeroRuby::PayrollNz
|
|
201
211
|
if attributes.key?(:'job_title')
|
202
212
|
self.job_title = attributes[:'job_title']
|
203
213
|
end
|
214
|
+
|
215
|
+
if attributes.key?(:'engagement_type')
|
216
|
+
self.engagement_type = attributes[:'engagement_type']
|
217
|
+
end
|
218
|
+
|
219
|
+
if attributes.key?(:'fixed_term_end_date')
|
220
|
+
self.fixed_term_end_date = attributes[:'fixed_term_end_date']
|
221
|
+
end
|
204
222
|
end
|
205
223
|
|
206
224
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -247,7 +265,9 @@ module XeroRuby::PayrollNz
|
|
247
265
|
payroll_calendar_id == o.payroll_calendar_id &&
|
248
266
|
updated_date_utc == o.updated_date_utc &&
|
249
267
|
created_date_utc == o.created_date_utc &&
|
250
|
-
job_title == o.job_title
|
268
|
+
job_title == o.job_title &&
|
269
|
+
engagement_type == o.engagement_type &&
|
270
|
+
fixed_term_end_date == o.fixed_term_end_date
|
251
271
|
end
|
252
272
|
|
253
273
|
# @see the `==` method
|
@@ -259,7 +279,7 @@ module XeroRuby::PayrollNz
|
|
259
279
|
# Calculates hash code according to all attributes.
|
260
280
|
# @return [Integer] Hash code
|
261
281
|
def hash
|
262
|
-
[employee_id, title, first_name, last_name, date_of_birth, address, email, gender, phone_number, start_date, end_date, payroll_calendar_id, updated_date_utc, created_date_utc, job_title].hash
|
282
|
+
[employee_id, title, first_name, last_name, date_of_birth, address, email, gender, phone_number, start_date, end_date, payroll_calendar_id, updated_date_utc, created_date_utc, job_title, engagement_type, fixed_term_end_date].hash
|
263
283
|
end
|
264
284
|
|
265
285
|
# Builds the object from hash
|
@@ -37,6 +37,12 @@ module XeroRuby::PayrollNz
|
|
37
37
|
# Initial sick leave balance. This will be positive unless they've taken sick leave in advance
|
38
38
|
attr_accessor :sick_leave_opening_balance
|
39
39
|
|
40
|
+
# Set Schedule of Accrual Type for Sick Leave
|
41
|
+
attr_accessor :sick_leave_schedule_of_accrual
|
42
|
+
|
43
|
+
# If Sick Leave Schedule of Accrual is \"OnAnniversaryDate\", this is the date when entitled to Sick Leave
|
44
|
+
attr_accessor :sick_leave_anniversary_date
|
45
|
+
|
40
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
47
|
def self.attribute_map
|
42
48
|
{
|
@@ -46,7 +52,9 @@ module XeroRuby::PayrollNz
|
|
46
52
|
:'negative_annual_leave_balance_paid_amount' => :'negativeAnnualLeaveBalancePaidAmount',
|
47
53
|
:'sick_leave_hours_to_accrue_annually' => :'sickLeaveHoursToAccrueAnnually',
|
48
54
|
:'sick_leave_maximum_hours_to_accrue' => :'sickLeaveMaximumHoursToAccrue',
|
49
|
-
:'sick_leave_opening_balance' => :'sickLeaveOpeningBalance'
|
55
|
+
:'sick_leave_opening_balance' => :'sickLeaveOpeningBalance',
|
56
|
+
:'sick_leave_schedule_of_accrual' => :'SickLeaveScheduleOfAccrual',
|
57
|
+
:'sick_leave_anniversary_date' => :'SickLeaveAnniversaryDate'
|
50
58
|
}
|
51
59
|
end
|
52
60
|
|
@@ -59,7 +67,9 @@ module XeroRuby::PayrollNz
|
|
59
67
|
:'negative_annual_leave_balance_paid_amount' => :'BigDecimal',
|
60
68
|
:'sick_leave_hours_to_accrue_annually' => :'BigDecimal',
|
61
69
|
:'sick_leave_maximum_hours_to_accrue' => :'BigDecimal',
|
62
|
-
:'sick_leave_opening_balance' => :'BigDecimal'
|
70
|
+
:'sick_leave_opening_balance' => :'BigDecimal',
|
71
|
+
:'sick_leave_schedule_of_accrual' => :'String',
|
72
|
+
:'sick_leave_anniversary_date' => :'Date'
|
63
73
|
}
|
64
74
|
end
|
65
75
|
|
@@ -105,6 +115,14 @@ module XeroRuby::PayrollNz
|
|
105
115
|
if attributes.key?(:'sick_leave_opening_balance')
|
106
116
|
self.sick_leave_opening_balance = attributes[:'sick_leave_opening_balance']
|
107
117
|
end
|
118
|
+
|
119
|
+
if attributes.key?(:'sick_leave_schedule_of_accrual')
|
120
|
+
self.sick_leave_schedule_of_accrual = attributes[:'sick_leave_schedule_of_accrual']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'sick_leave_anniversary_date')
|
124
|
+
self.sick_leave_anniversary_date = attributes[:'sick_leave_anniversary_date']
|
125
|
+
end
|
108
126
|
end
|
109
127
|
|
110
128
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -131,7 +149,9 @@ module XeroRuby::PayrollNz
|
|
131
149
|
negative_annual_leave_balance_paid_amount == o.negative_annual_leave_balance_paid_amount &&
|
132
150
|
sick_leave_hours_to_accrue_annually == o.sick_leave_hours_to_accrue_annually &&
|
133
151
|
sick_leave_maximum_hours_to_accrue == o.sick_leave_maximum_hours_to_accrue &&
|
134
|
-
sick_leave_opening_balance == o.sick_leave_opening_balance
|
152
|
+
sick_leave_opening_balance == o.sick_leave_opening_balance &&
|
153
|
+
sick_leave_schedule_of_accrual == o.sick_leave_schedule_of_accrual &&
|
154
|
+
sick_leave_anniversary_date == o.sick_leave_anniversary_date
|
135
155
|
end
|
136
156
|
|
137
157
|
# @see the `==` method
|
@@ -143,7 +163,7 @@ module XeroRuby::PayrollNz
|
|
143
163
|
# Calculates hash code according to all attributes.
|
144
164
|
# @return [Integer] Hash code
|
145
165
|
def hash
|
146
|
-
[include_holiday_pay, holiday_pay_opening_balance, annual_leave_opening_balance, negative_annual_leave_balance_paid_amount, sick_leave_hours_to_accrue_annually, sick_leave_maximum_hours_to_accrue, sick_leave_opening_balance].hash
|
166
|
+
[include_holiday_pay, holiday_pay_opening_balance, annual_leave_opening_balance, negative_annual_leave_balance_paid_amount, sick_leave_hours_to_accrue_annually, sick_leave_maximum_hours_to_accrue, sick_leave_opening_balance, sick_leave_schedule_of_accrual, sick_leave_anniversary_date].hash
|
147
167
|
end
|
148
168
|
|
149
169
|
# Builds the object from hash
|