Class: MergeHRISClient::FieldMappingApiInstanceResponse
- Inherits:
-
Object
- Object
- MergeHRISClient::FieldMappingApiInstanceResponse
- Defined in:
- lib/merge_hris_client/models/field_mapping_api_instance_response.rb
Instance Attribute Summary collapse
-
#bank_info ⇒ Object
Returns the value of attribute bank_info.
-
#benefit ⇒ Object
Returns the value of attribute benefit.
-
#company ⇒ Object
Returns the value of attribute company.
-
#dependent ⇒ Object
Returns the value of attribute dependent.
-
#employee ⇒ Object
Returns the value of attribute employee.
-
#employee_payroll_run ⇒ Object
Returns the value of attribute employee_payroll_run.
-
#employer_benefit ⇒ Object
Returns the value of attribute employer_benefit.
-
#employment ⇒ Object
Returns the value of attribute employment.
-
#group ⇒ Object
Returns the value of attribute group.
-
#location ⇒ Object
Returns the value of attribute location.
-
#pay_group ⇒ Object
Returns the value of attribute pay_group.
-
#payroll_run ⇒ Object
Returns the value of attribute payroll_run.
-
#team ⇒ Object
Returns the value of attribute team.
-
#time_off ⇒ Object
Returns the value of attribute time_off.
-
#time_off_balance ⇒ Object
Returns the value of attribute time_off_balance.
-
#timesheet_entry ⇒ Object
Returns the value of attribute timesheet_entry.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_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 ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ FieldMappingApiInstanceResponse
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 = {}) ⇒ FieldMappingApiInstanceResponse
Initializes the object
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 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 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 107 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::FieldMappingApiInstanceResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::FieldMappingApiInstanceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'benefit') if (value = attributes[:'benefit']).is_a?(Array) self.benefit = value end end if attributes.key?(:'employer_benefit') if (value = attributes[:'employer_benefit']).is_a?(Array) self.employer_benefit = value end end if attributes.key?(:'company') if (value = attributes[:'company']).is_a?(Array) self.company = value end end if attributes.key?(:'employee_payroll_run') if (value = attributes[:'employee_payroll_run']).is_a?(Array) self.employee_payroll_run = value end end if attributes.key?(:'employee') if (value = attributes[:'employee']).is_a?(Array) self.employee = value end end if attributes.key?(:'employment') if (value = attributes[:'employment']).is_a?(Array) self.employment = value end end if attributes.key?(:'location') if (value = attributes[:'location']).is_a?(Array) self.location = value end end if attributes.key?(:'payroll_run') if (value = attributes[:'payroll_run']).is_a?(Array) self.payroll_run = value end end if attributes.key?(:'team') if (value = attributes[:'team']).is_a?(Array) self.team = value end end if attributes.key?(:'time_off') if (value = attributes[:'time_off']).is_a?(Array) self.time_off = value end end if attributes.key?(:'time_off_balance') if (value = attributes[:'time_off_balance']).is_a?(Array) self.time_off_balance = value end end if attributes.key?(:'bank_info') if (value = attributes[:'bank_info']).is_a?(Array) self.bank_info = value end end if attributes.key?(:'pay_group') if (value = attributes[:'pay_group']).is_a?(Array) self.pay_group = value end end if attributes.key?(:'group') if (value = attributes[:'group']).is_a?(Array) self.group = value end end if attributes.key?(:'dependent') if (value = attributes[:'dependent']).is_a?(Array) self.dependent = value end end if attributes.key?(:'timesheet_entry') if (value = attributes[:'timesheet_entry']).is_a?(Array) self.timesheet_entry = value end end end |
Instance Attribute Details
#bank_info ⇒ Object
Returns the value of attribute bank_info.
40 41 42 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 40 def bank_info @bank_info end |
#benefit ⇒ Object
Returns the value of attribute benefit.
18 19 20 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 18 def benefit @benefit end |
#company ⇒ Object
Returns the value of attribute company.
22 23 24 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 22 def company @company end |
#dependent ⇒ Object
Returns the value of attribute dependent.
46 47 48 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 46 def dependent @dependent end |
#employee ⇒ Object
Returns the value of attribute employee.
26 27 28 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 26 def employee @employee end |
#employee_payroll_run ⇒ Object
Returns the value of attribute employee_payroll_run.
24 25 26 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 24 def employee_payroll_run @employee_payroll_run end |
#employer_benefit ⇒ Object
Returns the value of attribute employer_benefit.
20 21 22 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 20 def employer_benefit @employer_benefit end |
#employment ⇒ Object
Returns the value of attribute employment.
28 29 30 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 28 def employment @employment end |
#group ⇒ Object
Returns the value of attribute group.
44 45 46 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 44 def group @group end |
#location ⇒ Object
Returns the value of attribute location.
30 31 32 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 30 def location @location end |
#pay_group ⇒ Object
Returns the value of attribute pay_group.
42 43 44 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 42 def pay_group @pay_group end |
#payroll_run ⇒ Object
Returns the value of attribute payroll_run.
32 33 34 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 32 def payroll_run @payroll_run end |
#team ⇒ Object
Returns the value of attribute team.
34 35 36 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 34 def team @team end |
#time_off ⇒ Object
Returns the value of attribute time_off.
36 37 38 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 36 def time_off @time_off end |
#time_off_balance ⇒ Object
Returns the value of attribute time_off_balance.
38 39 40 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 38 def time_off_balance @time_off_balance end |
#timesheet_entry ⇒ Object
Returns the value of attribute timesheet_entry.
48 49 50 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 48 def timesheet_entry @timesheet_entry end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
73 74 75 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 73 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 51 def self.attribute_map { :'benefit' => :'Benefit', :'employer_benefit' => :'EmployerBenefit', :'company' => :'Company', :'employee_payroll_run' => :'EmployeePayrollRun', :'employee' => :'Employee', :'employment' => :'Employment', :'location' => :'Location', :'payroll_run' => :'PayrollRun', :'team' => :'Team', :'time_off' => :'TimeOff', :'time_off_balance' => :'TimeOffBalance', :'bank_info' => :'BankInfo', :'pay_group' => :'PayGroup', :'group' => :'Group', :'dependent' => :'Dependent', :'timesheet_entry' => :'TimesheetEntry' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
268 269 270 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 268 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
100 101 102 103 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 100 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 78 def self.openapi_types { :'benefit' => :'Array<FieldMappingApiInstance>', :'employer_benefit' => :'Array<FieldMappingApiInstance>', :'company' => :'Array<FieldMappingApiInstance>', :'employee_payroll_run' => :'Array<FieldMappingApiInstance>', :'employee' => :'Array<FieldMappingApiInstance>', :'employment' => :'Array<FieldMappingApiInstance>', :'location' => :'Array<FieldMappingApiInstance>', :'payroll_run' => :'Array<FieldMappingApiInstance>', :'team' => :'Array<FieldMappingApiInstance>', :'time_off' => :'Array<FieldMappingApiInstance>', :'time_off_balance' => :'Array<FieldMappingApiInstance>', :'bank_info' => :'Array<FieldMappingApiInstance>', :'pay_group' => :'Array<FieldMappingApiInstance>', :'group' => :'Array<FieldMappingApiInstance>', :'dependent' => :'Array<FieldMappingApiInstance>', :'timesheet_entry' => :'Array<FieldMappingApiInstance>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 232 def ==(o) return true if self.equal?(o) self.class == o.class && benefit == o.benefit && employer_benefit == o.employer_benefit && company == o.company && employee_payroll_run == o.employee_payroll_run && employee == o.employee && employment == o.employment && location == o.location && payroll_run == o.payroll_run && team == o.team && time_off == o.time_off && time_off_balance == o.time_off_balance && bank_info == o.bank_info && pay_group == o.pay_group && group == o.group && dependent == o.dependent && timesheet_entry == o.timesheet_entry end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 298 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value 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 # models (e.g. Pet) or oneOf klass = MergeHRISClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
369 370 371 372 373 374 375 376 377 378 379 380 381 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 369 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
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 275 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif 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 end self end |
#eql?(o) ⇒ Boolean
255 256 257 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 255 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
261 262 263 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 261 def hash [benefit, employer_benefit, company, employee_payroll_run, employee, employment, location, payroll_run, team, time_off, time_off_balance, bank_info, pay_group, group, dependent, timesheet_entry].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
219 220 221 222 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 219 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
345 346 347 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 345 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 351 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
339 340 341 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 339 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
226 227 228 |
# File 'lib/merge_hris_client/models/field_mapping_api_instance_response.rb', line 226 def valid? true end |