Class: TripletexRubyClient::SalaryTransactionInternal
- Inherits:
-
Object
- Object
- TripletexRubyClient::SalaryTransactionInternal
- Defined in:
- lib/tripletex_ruby_client/models/salary_transaction_internal.rb
Instance Attribute Summary collapse
-
#changes ⇒ Object
Returns the value of attribute changes.
-
#completed ⇒ Object
Returns the value of attribute completed.
-
#date ⇒ Object
Voucher date.
-
#has_bank_transfers ⇒ Object
Returns the value of attribute has_bank_transfers.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_autopay_module_remit ⇒ Object
Returns the value of attribute is_autopay_module_remit.
-
#is_filtered_on_expenses ⇒ Object
Returns the value of attribute is_filtered_on_expenses.
-
#is_filtered_on_open_posts ⇒ Object
Returns the value of attribute is_filtered_on_open_posts.
-
#is_filtered_on_regular_salary ⇒ Object
Returns the value of attribute is_filtered_on_regular_salary.
-
#is_filtered_on_travel_expenses ⇒ Object
Returns the value of attribute is_filtered_on_travel_expenses.
-
#is_historical ⇒ Object
With historical wage vouchers you can update the wage system with information dated before the opening balance.
-
#is_nets_module_remit ⇒ Object
Returns the value of attribute is_nets_module_remit.
-
#month ⇒ Object
Returns the value of attribute month.
-
#pay_slips_available_date ⇒ Object
The date payslips are made available to the employee.
-
#payroll_tax_calc_method ⇒ Object
Employee National Insurance calculation method.
-
#payslip_general_comment ⇒ Object
Comment to be shown on all payslips.
-
#payslips ⇒ Object
Link to individual payslip objects.
-
#period_as_string ⇒ Object
Returns the value of attribute period_as_string.
-
#url ⇒ Object
Returns the value of attribute url.
-
#version ⇒ Object
Returns the value of attribute version.
-
#voucher_comment ⇒ Object
Comment on voucher.
-
#year ⇒ Object
Returns the value of attribute year.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ SalaryTransactionInternal
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ SalaryTransactionInternal
Initializes the object
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 126 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'version') self.version = attributes[:'version'] end if attributes.has_key?(:'changes') if (value = attributes[:'changes']).is_a?(Array) self.changes = value end end if attributes.has_key?(:'url') self.url = attributes[:'url'] end if attributes.has_key?(:'date') self.date = attributes[:'date'] end if attributes.has_key?(:'year') self.year = attributes[:'year'] end if attributes.has_key?(:'month') self.month = attributes[:'month'] end if attributes.has_key?(:'periodAsString') self.period_as_string = attributes[:'periodAsString'] end if attributes.has_key?(:'isHistorical') self.is_historical = attributes[:'isHistorical'] end if attributes.has_key?(:'payrollTaxCalcMethod') self.payroll_tax_calc_method = attributes[:'payrollTaxCalcMethod'] end if attributes.has_key?(:'voucherComment') self.voucher_comment = attributes[:'voucherComment'] end if attributes.has_key?(:'payslipGeneralComment') self.payslip_general_comment = attributes[:'payslipGeneralComment'] end if attributes.has_key?(:'completed') self.completed = attributes[:'completed'] end if attributes.has_key?(:'paySlipsAvailableDate') self.pay_slips_available_date = attributes[:'paySlipsAvailableDate'] end if attributes.has_key?(:'isFilteredOnRegularSalary') self.is_filtered_on_regular_salary = attributes[:'isFilteredOnRegularSalary'] end if attributes.has_key?(:'isFilteredOnOpenPosts') self.is_filtered_on_open_posts = attributes[:'isFilteredOnOpenPosts'] end if attributes.has_key?(:'isFilteredOnTravelExpenses') self.is_filtered_on_travel_expenses = attributes[:'isFilteredOnTravelExpenses'] end if attributes.has_key?(:'isFilteredOnExpenses') self.is_filtered_on_expenses = attributes[:'isFilteredOnExpenses'] end if attributes.has_key?(:'isNetsModuleRemit') self.is_nets_module_remit = attributes[:'isNetsModuleRemit'] end if attributes.has_key?(:'isAutopayModuleRemit') self.is_autopay_module_remit = attributes[:'isAutopayModuleRemit'] end if attributes.has_key?(:'hasBankTransfers') self.has_bank_transfers = attributes[:'hasBankTransfers'] end if attributes.has_key?(:'payslips') if (value = attributes[:'payslips']).is_a?(Array) self.payslips = value end end end |
Instance Attribute Details
#changes ⇒ Object
Returns the value of attribute changes.
21 22 23 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 21 def changes @changes end |
#completed ⇒ Object
Returns the value of attribute completed.
46 47 48 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 46 def completed @completed end |
#date ⇒ Object
Voucher date.
26 27 28 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 26 def date @date end |
#has_bank_transfers ⇒ Object
Returns the value of attribute has_bank_transfers.
63 64 65 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 63 def has_bank_transfers @has_bank_transfers end |
#id ⇒ Object
Returns the value of attribute id.
17 18 19 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 17 def id @id end |
#is_autopay_module_remit ⇒ Object
Returns the value of attribute is_autopay_module_remit.
61 62 63 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 61 def is_autopay_module_remit @is_autopay_module_remit end |
#is_filtered_on_expenses ⇒ Object
Returns the value of attribute is_filtered_on_expenses.
57 58 59 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 57 def is_filtered_on_expenses @is_filtered_on_expenses end |
#is_filtered_on_open_posts ⇒ Object
Returns the value of attribute is_filtered_on_open_posts.
53 54 55 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 53 def is_filtered_on_open_posts @is_filtered_on_open_posts end |
#is_filtered_on_regular_salary ⇒ Object
Returns the value of attribute is_filtered_on_regular_salary.
51 52 53 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 51 def is_filtered_on_regular_salary @is_filtered_on_regular_salary end |
#is_filtered_on_travel_expenses ⇒ Object
Returns the value of attribute is_filtered_on_travel_expenses.
55 56 57 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 55 def is_filtered_on_travel_expenses @is_filtered_on_travel_expenses end |
#is_historical ⇒ Object
With historical wage vouchers you can update the wage system with information dated before the opening balance.
35 36 37 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 35 def is_historical @is_historical end |
#is_nets_module_remit ⇒ Object
Returns the value of attribute is_nets_module_remit.
59 60 61 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 59 def is_nets_module_remit @is_nets_module_remit end |
#month ⇒ Object
Returns the value of attribute month.
30 31 32 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 30 def month @month end |
#pay_slips_available_date ⇒ Object
The date payslips are made available to the employee. Defaults to voucherDate.
49 50 51 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 49 def pay_slips_available_date @pay_slips_available_date end |
#payroll_tax_calc_method ⇒ Object
Employee National Insurance calculation method
38 39 40 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 38 def payroll_tax_calc_method @payroll_tax_calc_method end |
#payslip_general_comment ⇒ Object
Comment to be shown on all payslips
44 45 46 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 44 def payslip_general_comment @payslip_general_comment end |
#payslips ⇒ Object
Link to individual payslip objects.
66 67 68 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 66 def payslips @payslips end |
#period_as_string ⇒ Object
Returns the value of attribute period_as_string.
32 33 34 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 32 def period_as_string @period_as_string end |
#url ⇒ Object
Returns the value of attribute url.
23 24 25 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 23 def url @url end |
#version ⇒ Object
Returns the value of attribute version.
19 20 21 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 19 def version @version end |
#voucher_comment ⇒ Object
Comment on voucher
41 42 43 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 41 def voucher_comment @voucher_comment end |
#year ⇒ Object
Returns the value of attribute year.
28 29 30 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 28 def year @year end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 69 def self.attribute_map { :'id' => :'id', :'version' => :'version', :'changes' => :'changes', :'url' => :'url', :'date' => :'date', :'year' => :'year', :'month' => :'month', :'period_as_string' => :'periodAsString', :'is_historical' => :'isHistorical', :'payroll_tax_calc_method' => :'payrollTaxCalcMethod', :'voucher_comment' => :'voucherComment', :'payslip_general_comment' => :'payslipGeneralComment', :'completed' => :'completed', :'pay_slips_available_date' => :'paySlipsAvailableDate', :'is_filtered_on_regular_salary' => :'isFilteredOnRegularSalary', :'is_filtered_on_open_posts' => :'isFilteredOnOpenPosts', :'is_filtered_on_travel_expenses' => :'isFilteredOnTravelExpenses', :'is_filtered_on_expenses' => :'isFilteredOnExpenses', :'is_nets_module_remit' => :'isNetsModuleRemit', :'is_autopay_module_remit' => :'isAutopayModuleRemit', :'has_bank_transfers' => :'hasBankTransfers', :'payslips' => :'payslips' } end |
.swagger_types ⇒ Object
Attribute type mapping.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 97 def self.swagger_types { :'id' => :'Integer', :'version' => :'Integer', :'changes' => :'Array<Change>', :'url' => :'String', :'date' => :'String', :'year' => :'Integer', :'month' => :'Integer', :'period_as_string' => :'String', :'is_historical' => :'BOOLEAN', :'payroll_tax_calc_method' => :'String', :'voucher_comment' => :'String', :'payslip_general_comment' => :'String', :'completed' => :'BOOLEAN', :'pay_slips_available_date' => :'String', :'is_filtered_on_regular_salary' => :'BOOLEAN', :'is_filtered_on_open_posts' => :'BOOLEAN', :'is_filtered_on_travel_expenses' => :'BOOLEAN', :'is_filtered_on_expenses' => :'BOOLEAN', :'is_nets_module_remit' => :'BOOLEAN', :'is_autopay_module_remit' => :'BOOLEAN', :'has_bank_transfers' => :'BOOLEAN', :'payslips' => :'Array<PayslipInternal>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 270 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && version == o.version && changes == o.changes && url == o.url && date == o.date && year == o.year && month == o.month && period_as_string == o.period_as_string && is_historical == o.is_historical && payroll_tax_calc_method == o.payroll_tax_calc_method && voucher_comment == o.voucher_comment && payslip_general_comment == o.payslip_general_comment && completed == o.completed && pay_slips_available_date == o.pay_slips_available_date && is_filtered_on_regular_salary == o.is_filtered_on_regular_salary && is_filtered_on_open_posts == o.is_filtered_on_open_posts && is_filtered_on_travel_expenses == o.is_filtered_on_travel_expenses && is_filtered_on_expenses == o.is_filtered_on_expenses && is_nets_module_remit == o.is_nets_module_remit && is_autopay_module_remit == o.is_autopay_module_remit && has_bank_transfers == o.has_bank_transfers && payslips == o.payslips end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 333 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = TripletexRubyClient.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
399 400 401 402 403 404 405 406 407 408 409 410 411 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 399 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 312 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
299 300 301 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 299 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
305 306 307 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 305 def hash [id, version, changes, url, date, year, month, period_as_string, is_historical, payroll_tax_calc_method, voucher_comment, payslip_general_comment, completed, pay_slips_available_date, is_filtered_on_regular_salary, is_filtered_on_open_posts, is_filtered_on_travel_expenses, is_filtered_on_expenses, is_nets_module_remit, is_autopay_module_remit, has_bank_transfers, payslips].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 227 def list_invalid_properties invalid_properties = Array.new if @year.nil? invalid_properties.push('invalid value for "year", year cannot be nil.') end if @month.nil? invalid_properties.push('invalid value for "month", month cannot be nil.') end if !@payroll_tax_calc_method.nil? && @payroll_tax_calc_method.to_s.length > 2 invalid_properties.push('invalid value for "payroll_tax_calc_method", the character length must be smaller than or equal to 2.') end if @payslips.nil? invalid_properties.push('invalid value for "payslips", payslips cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
379 380 381 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 379 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
385 386 387 388 389 390 391 392 393 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 385 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
373 374 375 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 373 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
250 251 252 253 254 255 256 |
# File 'lib/tripletex_ruby_client/models/salary_transaction_internal.rb', line 250 def valid? return false if @year.nil? return false if @month.nil? return false if !@payroll_tax_calc_method.nil? && @payroll_tax_calc_method.to_s.length > 2 return false if @payslips.nil? true end |