Class: FdxV660Api::ContributionEntity
- Defined in:
- lib/fdx_v660_api/models/contribution_entity.rb
Overview
Contribution information to an investment account
Instance Attribute Summary collapse
-
#catch_up_contribution ⇒ TrueClass | FalseClass
If true, indicates that this is a catch up contribution.
-
#employee_after_tax_amount ⇒ Float
Employee after tax contribution amount.
-
#employee_after_tax_percentage ⇒ Float
Employee after tax contribution percentage.
-
#employee_defer_pre_tax_amount ⇒ Float
Employee defer pre-tax contribution match amount.
-
#employee_defer_pre_tax_percentage ⇒ Float
Employee defer pre-tax contribution match percentage.
-
#employee_pre_tax_amount ⇒ Float
Employee pre-tax contribution amount.
-
#employee_pre_tax_percentage ⇒ Float
Employee pre-tax contribution percentage.
-
#employee_roth_tax_amount ⇒ Float
Employee Roth contribution amount.
-
#employee_roth_tax_percentage ⇒ Float
Employee Roth contribution percentage.
-
#employee_year_to_date ⇒ Float
Employee total year to date contribution.
-
#employer_match_amount ⇒ Float
Employer contribution match amount.
-
#employer_match_percentage ⇒ Float
Employer contribution match percentage.
-
#employer_year_to_date ⇒ Float
Employer total year to date contribution.
-
#rollover_contribution_amount ⇒ Float
Rollover contribution Amount.
-
#rollover_contribution_percentage ⇒ Float
Rollover contribution percentage.
-
#security_id ⇒ String
Unique identifier of security.
-
#security_id_type ⇒ SecurityIdType1
CINS, CMC, CME, CUSIP, ISIN, ITSA, NASDAQ, SEDOL, SICC, VALOR, WKN.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(security_id: SKIP, security_id_type: SKIP, employer_match_percentage: SKIP, employer_match_amount: SKIP, employee_pre_tax_amount: SKIP, employee_pre_tax_percentage: SKIP, employee_after_tax_amount: SKIP, employee_after_tax_percentage: SKIP, employee_roth_tax_amount: SKIP, employee_roth_tax_percentage: SKIP, employee_defer_pre_tax_amount: SKIP, employee_defer_pre_tax_percentage: SKIP, employee_year_to_date: SKIP, employer_year_to_date: SKIP, rollover_contribution_percentage: SKIP, rollover_contribution_amount: SKIP, catch_up_contribution: SKIP, additional_properties: nil) ⇒ ContributionEntity
constructor
A new instance of ContributionEntity.
-
#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(security_id: SKIP, security_id_type: SKIP, employer_match_percentage: SKIP, employer_match_amount: SKIP, employee_pre_tax_amount: SKIP, employee_pre_tax_percentage: SKIP, employee_after_tax_amount: SKIP, employee_after_tax_percentage: SKIP, employee_roth_tax_amount: SKIP, employee_roth_tax_percentage: SKIP, employee_defer_pre_tax_amount: SKIP, employee_defer_pre_tax_percentage: SKIP, employee_year_to_date: SKIP, employer_year_to_date: SKIP, rollover_contribution_percentage: SKIP, rollover_contribution_amount: SKIP, catch_up_contribution: SKIP, additional_properties: nil) ⇒ ContributionEntity
Returns a new instance of ContributionEntity.
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 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 133 def initialize(security_id: SKIP, security_id_type: SKIP, employer_match_percentage: SKIP, employer_match_amount: SKIP, employee_pre_tax_amount: SKIP, employee_pre_tax_percentage: SKIP, employee_after_tax_amount: SKIP, employee_after_tax_percentage: SKIP, employee_roth_tax_amount: SKIP, employee_roth_tax_percentage: SKIP, employee_defer_pre_tax_amount: SKIP, employee_defer_pre_tax_percentage: SKIP, employee_year_to_date: SKIP, employer_year_to_date: SKIP, rollover_contribution_percentage: SKIP, rollover_contribution_amount: SKIP, catch_up_contribution: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @security_id = security_id unless security_id == SKIP @security_id_type = security_id_type unless security_id_type == SKIP unless employer_match_percentage == SKIP @employer_match_percentage = employer_match_percentage end @employer_match_amount = employer_match_amount unless employer_match_amount == SKIP @employee_pre_tax_amount = employee_pre_tax_amount unless employee_pre_tax_amount == SKIP unless employee_pre_tax_percentage == SKIP @employee_pre_tax_percentage = employee_pre_tax_percentage end unless employee_after_tax_amount == SKIP @employee_after_tax_amount = employee_after_tax_amount end unless employee_after_tax_percentage == SKIP @employee_after_tax_percentage = employee_after_tax_percentage end @employee_roth_tax_amount = employee_roth_tax_amount unless employee_roth_tax_amount == SKIP unless employee_roth_tax_percentage == SKIP @employee_roth_tax_percentage = employee_roth_tax_percentage end unless employee_defer_pre_tax_amount == SKIP @employee_defer_pre_tax_amount = employee_defer_pre_tax_amount end unless employee_defer_pre_tax_percentage == SKIP @employee_defer_pre_tax_percentage = employee_defer_pre_tax_percentage end @employee_year_to_date = employee_year_to_date unless employee_year_to_date == SKIP @employer_year_to_date = employer_year_to_date unless employer_year_to_date == SKIP unless rollover_contribution_percentage == SKIP @rollover_contribution_percentage = rollover_contribution_percentage end unless rollover_contribution_amount == SKIP @rollover_contribution_amount = rollover_contribution_amount end @catch_up_contribution = catch_up_contribution unless catch_up_contribution == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#catch_up_contribution ⇒ TrueClass | FalseClass
If true, indicates that this is a catch up contribution
78 79 80 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 78 def catch_up_contribution @catch_up_contribution end |
#employee_after_tax_amount ⇒ Float
Employee after tax contribution amount
38 39 40 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 38 def employee_after_tax_amount @employee_after_tax_amount end |
#employee_after_tax_percentage ⇒ Float
Employee after tax contribution percentage
42 43 44 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 42 def employee_after_tax_percentage @employee_after_tax_percentage end |
#employee_defer_pre_tax_amount ⇒ Float
Employee defer pre-tax contribution match amount
54 55 56 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 54 def employee_defer_pre_tax_amount @employee_defer_pre_tax_amount end |
#employee_defer_pre_tax_percentage ⇒ Float
Employee defer pre-tax contribution match percentage
58 59 60 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 58 def employee_defer_pre_tax_percentage @employee_defer_pre_tax_percentage end |
#employee_pre_tax_amount ⇒ Float
Employee pre-tax contribution amount
30 31 32 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 30 def employee_pre_tax_amount @employee_pre_tax_amount end |
#employee_pre_tax_percentage ⇒ Float
Employee pre-tax contribution percentage
34 35 36 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 34 def employee_pre_tax_percentage @employee_pre_tax_percentage end |
#employee_roth_tax_amount ⇒ Float
Employee Roth contribution amount
46 47 48 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 46 def employee_roth_tax_amount @employee_roth_tax_amount end |
#employee_roth_tax_percentage ⇒ Float
Employee Roth contribution percentage
50 51 52 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 50 def employee_roth_tax_percentage @employee_roth_tax_percentage end |
#employee_year_to_date ⇒ Float
Employee total year to date contribution
62 63 64 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 62 def employee_year_to_date @employee_year_to_date end |
#employer_match_amount ⇒ Float
Employer contribution match amount
26 27 28 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 26 def employer_match_amount @employer_match_amount end |
#employer_match_percentage ⇒ Float
Employer contribution match percentage
22 23 24 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 22 def employer_match_percentage @employer_match_percentage end |
#employer_year_to_date ⇒ Float
Employer total year to date contribution
66 67 68 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 66 def employer_year_to_date @employer_year_to_date end |
#rollover_contribution_amount ⇒ Float
Rollover contribution Amount
74 75 76 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 74 def rollover_contribution_amount @rollover_contribution_amount end |
#rollover_contribution_percentage ⇒ Float
Rollover contribution percentage
70 71 72 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 70 def rollover_contribution_percentage @rollover_contribution_percentage end |
#security_id ⇒ String
Unique identifier of security
14 15 16 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 14 def security_id @security_id end |
#security_id_type ⇒ SecurityIdType1
CINS, CMC, CME, CUSIP, ISIN, ITSA, NASDAQ, SEDOL, SICC, VALOR, WKN
18 19 20 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 18 def security_id_type @security_id_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 198 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. security_id = hash.key?('securityId') ? hash['securityId'] : SKIP security_id_type = hash.key?('securityIdType') ? hash['securityIdType'] : SKIP employer_match_percentage = hash.key?('employerMatchPercentage') ? hash['employerMatchPercentage'] : SKIP employer_match_amount = hash.key?('employerMatchAmount') ? hash['employerMatchAmount'] : SKIP employee_pre_tax_amount = hash.key?('employeePreTaxAmount') ? hash['employeePreTaxAmount'] : SKIP employee_pre_tax_percentage = hash.key?('employeePreTaxPercentage') ? hash['employeePreTaxPercentage'] : SKIP employee_after_tax_amount = hash.key?('employeeAfterTaxAmount') ? hash['employeeAfterTaxAmount'] : SKIP employee_after_tax_percentage = hash.key?('employeeAfterTaxPercentage') ? hash['employeeAfterTaxPercentage'] : SKIP employee_roth_tax_amount = hash.key?('employeeRothTaxAmount') ? hash['employeeRothTaxAmount'] : SKIP employee_roth_tax_percentage = hash.key?('employeeRothTaxPercentage') ? hash['employeeRothTaxPercentage'] : SKIP employee_defer_pre_tax_amount = hash.key?('employeeDeferPreTaxAmount') ? hash['employeeDeferPreTaxAmount'] : SKIP employee_defer_pre_tax_percentage = hash.key?('employeeDeferPreTaxPercentage') ? hash['employeeDeferPreTaxPercentage'] : SKIP employee_year_to_date = hash.key?('employeeYearToDate') ? hash['employeeYearToDate'] : SKIP employer_year_to_date = hash.key?('employerYearToDate') ? hash['employerYearToDate'] : SKIP rollover_contribution_percentage = hash.key?('rolloverContributionPercentage') ? hash['rolloverContributionPercentage'] : SKIP rollover_contribution_amount = hash.key?('rolloverContributionAmount') ? hash['rolloverContributionAmount'] : SKIP catch_up_contribution = hash.key?('catchUpContribution') ? hash['catchUpContribution'] : 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. ContributionEntity.new(security_id: security_id, security_id_type: security_id_type, employer_match_percentage: employer_match_percentage, employer_match_amount: employer_match_amount, employee_pre_tax_amount: employee_pre_tax_amount, employee_pre_tax_percentage: employee_pre_tax_percentage, employee_after_tax_amount: employee_after_tax_amount, employee_after_tax_percentage: employee_after_tax_percentage, employee_roth_tax_amount: employee_roth_tax_amount, employee_roth_tax_percentage: employee_roth_tax_percentage, employee_defer_pre_tax_amount: employee_defer_pre_tax_amount, employee_defer_pre_tax_percentage: employee_defer_pre_tax_percentage, employee_year_to_date: employee_year_to_date, employer_year_to_date: employer_year_to_date, rollover_contribution_percentage: rollover_contribution_percentage, rollover_contribution_amount: rollover_contribution_amount, catch_up_contribution: catch_up_contribution, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 81 def self.names @_hash = {} if @_hash.nil? @_hash['security_id'] = 'securityId' @_hash['security_id_type'] = 'securityIdType' @_hash['employer_match_percentage'] = 'employerMatchPercentage' @_hash['employer_match_amount'] = 'employerMatchAmount' @_hash['employee_pre_tax_amount'] = 'employeePreTaxAmount' @_hash['employee_pre_tax_percentage'] = 'employeePreTaxPercentage' @_hash['employee_after_tax_amount'] = 'employeeAfterTaxAmount' @_hash['employee_after_tax_percentage'] = 'employeeAfterTaxPercentage' @_hash['employee_roth_tax_amount'] = 'employeeRothTaxAmount' @_hash['employee_roth_tax_percentage'] = 'employeeRothTaxPercentage' @_hash['employee_defer_pre_tax_amount'] = 'employeeDeferPreTaxAmount' @_hash['employee_defer_pre_tax_percentage'] = 'employeeDeferPreTaxPercentage' @_hash['employee_year_to_date'] = 'employeeYearToDate' @_hash['employer_year_to_date'] = 'employerYearToDate' @_hash['rollover_contribution_percentage'] = 'rolloverContributionPercentage' @_hash['rollover_contribution_amount'] = 'rolloverContributionAmount' @_hash['catch_up_contribution'] = 'catchUpContribution' @_hash end |
.nullables ⇒ Object
An array for nullable fields
129 130 131 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 129 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 106 def self.optionals %w[ security_id security_id_type employer_match_percentage employer_match_amount employee_pre_tax_amount employee_pre_tax_percentage employee_after_tax_amount employee_after_tax_percentage employee_roth_tax_amount employee_roth_tax_percentage employee_defer_pre_tax_amount employee_defer_pre_tax_percentage employee_year_to_date employer_year_to_date rollover_contribution_percentage rollover_contribution_amount catch_up_contribution ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
266 267 268 269 270 271 272 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 266 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 294 def inspect class_name = self.class.name.split('::').last "<#{class_name} security_id: #{@security_id.inspect}, security_id_type:"\ " #{@security_id_type.inspect}, employer_match_percentage:"\ " #{@employer_match_percentage.inspect}, employer_match_amount:"\ " #{@employer_match_amount.inspect}, employee_pre_tax_amount:"\ " #{@employee_pre_tax_amount.inspect}, employee_pre_tax_percentage:"\ " #{@employee_pre_tax_percentage.inspect}, employee_after_tax_amount:"\ " #{@employee_after_tax_amount.inspect}, employee_after_tax_percentage:"\ " #{@employee_after_tax_percentage.inspect}, employee_roth_tax_amount:"\ " #{@employee_roth_tax_amount.inspect}, employee_roth_tax_percentage:"\ " #{@employee_roth_tax_percentage.inspect}, employee_defer_pre_tax_amount:"\ " #{@employee_defer_pre_tax_amount.inspect}, employee_defer_pre_tax_percentage:"\ " #{@employee_defer_pre_tax_percentage.inspect}, employee_year_to_date:"\ " #{@employee_year_to_date.inspect}, employer_year_to_date:"\ " #{@employer_year_to_date.inspect}, rollover_contribution_percentage:"\ " #{@rollover_contribution_percentage.inspect}, rollover_contribution_amount:"\ " #{@rollover_contribution_amount.inspect}, catch_up_contribution:"\ " #{@catch_up_contribution.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/fdx_v660_api/models/contribution_entity.rb', line 275 def to_s class_name = self.class.name.split('::').last "<#{class_name} security_id: #{@security_id}, security_id_type: #{@security_id_type},"\ " employer_match_percentage: #{@employer_match_percentage}, employer_match_amount:"\ " #{@employer_match_amount}, employee_pre_tax_amount: #{@employee_pre_tax_amount},"\ " employee_pre_tax_percentage: #{@employee_pre_tax_percentage}, employee_after_tax_amount:"\ " #{@employee_after_tax_amount}, employee_after_tax_percentage:"\ " #{@employee_after_tax_percentage}, employee_roth_tax_amount: #{@employee_roth_tax_amount},"\ " employee_roth_tax_percentage: #{@employee_roth_tax_percentage},"\ " employee_defer_pre_tax_amount: #{@employee_defer_pre_tax_amount},"\ " employee_defer_pre_tax_percentage: #{@employee_defer_pre_tax_percentage},"\ " employee_year_to_date: #{@employee_year_to_date}, employer_year_to_date:"\ " #{@employer_year_to_date}, rollover_contribution_percentage:"\ " #{@rollover_contribution_percentage}, rollover_contribution_amount:"\ " #{@rollover_contribution_amount}, catch_up_contribution: #{@catch_up_contribution},"\ " additional_properties: #{@additional_properties}>" end |