Class: ThePlaidApi::W2StateAndLocalWagesOverride
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::W2StateAndLocalWagesOverride
- Defined in:
- lib/the_plaid_api/models/w2_state_and_local_wages_override.rb
Overview
W2 state and local wages
Instance Attribute Summary collapse
-
#employer_state_id_number ⇒ String
State identification number of the employer.
-
#local_income_tax ⇒ String
Income tax from the locality.
-
#local_wages_tips ⇒ String
Wages and tips from the locality.
-
#locality_name ⇒ String
Name of the locality.
-
#state ⇒ String
State associated with the wage.
-
#state_income_tax ⇒ String
Income tax from the specified state.
-
#state_wages_tips ⇒ String
Wages and tips from the specified state.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(state: SKIP, employer_state_id_number: SKIP, state_wages_tips: SKIP, state_income_tax: SKIP, local_wages_tips: SKIP, local_income_tax: SKIP, locality_name: SKIP, additional_properties: nil) ⇒ W2StateAndLocalWagesOverride
constructor
A new instance of W2StateAndLocalWagesOverride.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(state: SKIP, employer_state_id_number: SKIP, state_wages_tips: SKIP, state_income_tax: SKIP, local_wages_tips: SKIP, local_income_tax: SKIP, locality_name: SKIP, additional_properties: nil) ⇒ W2StateAndLocalWagesOverride
Returns a new instance of W2StateAndLocalWagesOverride.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 79 def initialize(state: SKIP, employer_state_id_number: SKIP, state_wages_tips: SKIP, state_income_tax: SKIP, local_wages_tips: SKIP, local_income_tax: SKIP, locality_name: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @state = state unless state == SKIP @employer_state_id_number = employer_state_id_number unless employer_state_id_number == SKIP @state_wages_tips = state_wages_tips unless state_wages_tips == SKIP @state_income_tax = state_income_tax unless state_income_tax == SKIP @local_wages_tips = local_wages_tips unless local_wages_tips == SKIP @local_income_tax = local_income_tax unless local_income_tax == SKIP @locality_name = locality_name unless locality_name == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#employer_state_id_number ⇒ String
State identification number of the employer.
18 19 20 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 18 def employer_state_id_number @employer_state_id_number end |
#local_income_tax ⇒ String
Income tax from the locality.
34 35 36 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 34 def local_income_tax @local_income_tax end |
#local_wages_tips ⇒ String
Wages and tips from the locality.
30 31 32 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 30 def local_wages_tips @local_wages_tips end |
#locality_name ⇒ String
Name of the locality.
38 39 40 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 38 def locality_name @locality_name end |
#state ⇒ String
State associated with the wage.
14 15 16 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 14 def state @state end |
#state_income_tax ⇒ String
Income tax from the specified state.
26 27 28 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 26 def state_income_tax @state_income_tax end |
#state_wages_tips ⇒ String
Wages and tips from the specified state.
22 23 24 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 22 def state_wages_tips @state_wages_tips end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 123 124 125 126 127 128 129 130 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 97 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. state = hash.key?('state') ? hash['state'] : SKIP employer_state_id_number = hash.key?('employer_state_id_number') ? hash['employer_state_id_number'] : SKIP state_wages_tips = hash.key?('state_wages_tips') ? hash['state_wages_tips'] : SKIP state_income_tax = hash.key?('state_income_tax') ? hash['state_income_tax'] : SKIP local_wages_tips = hash.key?('local_wages_tips') ? hash['local_wages_tips'] : SKIP local_income_tax = hash.key?('local_income_tax') ? hash['local_income_tax'] : SKIP locality_name = hash.key?('locality_name') ? hash['locality_name'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. W2StateAndLocalWagesOverride.new(state: state, employer_state_id_number: employer_state_id_number, state_wages_tips: state_wages_tips, state_income_tax: state_income_tax, local_wages_tips: local_wages_tips, local_income_tax: local_income_tax, locality_name: locality_name, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['state'] = 'state' @_hash['employer_state_id_number'] = 'employer_state_id_number' @_hash['state_wages_tips'] = 'state_wages_tips' @_hash['state_income_tax'] = 'state_income_tax' @_hash['local_wages_tips'] = 'local_wages_tips' @_hash['local_income_tax'] = 'local_income_tax' @_hash['locality_name'] = 'locality_name' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 67 def self.nullables %w[ state employer_state_id_number state_wages_tips state_income_tax local_wages_tips local_income_tax locality_name ] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 54 def self.optionals %w[ state employer_state_id_number state_wages_tips state_income_tax local_wages_tips local_income_tax locality_name ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
142 143 144 145 146 147 148 149 150 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 142 def inspect class_name = self.class.name.split('::').last "<#{class_name} state: #{@state.inspect}, employer_state_id_number:"\ " #{@employer_state_id_number.inspect}, state_wages_tips: #{@state_wages_tips.inspect},"\ " state_income_tax: #{@state_income_tax.inspect}, local_wages_tips:"\ " #{@local_wages_tips.inspect}, local_income_tax: #{@local_income_tax.inspect},"\ " locality_name: #{@locality_name.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
133 134 135 136 137 138 139 |
# File 'lib/the_plaid_api/models/w2_state_and_local_wages_override.rb', line 133 def to_s class_name = self.class.name.split('::').last "<#{class_name} state: #{@state}, employer_state_id_number: #{@employer_state_id_number},"\ " state_wages_tips: #{@state_wages_tips}, state_income_tax: #{@state_income_tax},"\ " local_wages_tips: #{@local_wages_tips}, local_income_tax: #{@local_income_tax},"\ " locality_name: #{@locality_name}, additional_properties: #{@additional_properties}>" end |