Class: FdxV660Api::Form1099Div1
- Defined in:
- lib/fdx_v660_api/models/form1099_div1.rb
Overview
Dividends and Distributions
Instance Attribute Summary collapse
-
#account_id ⇒ String
Long-term persistent identity of the source account.
-
#account_number ⇒ String
Account number.
-
#additional_information ⇒ String
Additional explanation text or content about this tax form.
-
#attributes ⇒ Array[TaxFormAttribute]
Additional attributes for this tax form when defined fields are not available.
-
#cash_liquidation ⇒ Float
Box 9, Cash liquidation distributions.
-
#collectibles_gain ⇒ Float
Box 2d, Collectibles (28%) gain.
-
#corrected ⇒ TrueClass | FalseClass
True to indicate this is a corrected tax form.
-
#error ⇒ Error2
Present if an error was encountered while retrieving this form.
-
#federal_tax_withheld ⇒ Float
Box 4, Federal income tax withheld.
-
#foreign_account_tax_compliance ⇒ TrueClass | FalseClass
Box 11, FATCA filing requirement.
-
#foreign_country ⇒ String
Box 8, Foreign country or U.S.
-
#foreign_incomes ⇒ Array[DescriptionAndAmount]
Foreign income information, with country name or country code as description and total foreign income as amount.
-
#foreign_source_incomes ⇒ Array[ForeignSourceDividendIncome]
Details of income types from foreign sources into qualifiedDividends, nonQualifiedDividends and capitalGains.
-
#foreign_tax_paid ⇒ Float
Box 7, Foreign tax paid.
-
#investment_expenses ⇒ Float
Box 6, Investment expenses.
-
#issuer ⇒ TaxParty8
Issuer's name, address, phone, and TIN.
-
#links ⇒ Array[HateoasLink]
Links to retrieve this form as data or image, or to invoke other APIs.
-
#non_cash_liquidation ⇒ Float
Box 10, Noncash liquidation distributions.
-
#non_taxable_distribution ⇒ Float
Box 3, Nondividend distributions.
-
#ordinary_dividends ⇒ Float
Box 1a, Total ordinary dividends.
-
#qualified_dividends ⇒ Float
Box 1b, Qualified dividends.
-
#qualified_dividends_not_eligible ⇒ Float
Portion of qualified dividends not eligible for capital gains rates due to not meeting holding period requirements, if known.
-
#recipient ⇒ TaxParty1
Recipient's name, address, phone, and TIN.
-
#second_tin_notice ⇒ TrueClass | FalseClass
Second TIN Notice.
-
#section1202_gain ⇒ Float
Box 2c, Section 1202 gain.
-
#section199_a_dividends ⇒ Float
Box 5, Section 199A dividends.
-
#section897_capital_gain ⇒ Float
Box 2f, Section 897 capital gain.
-
#section897_dividends ⇒ Float
Box 2e, Section 897 ordinary dividends.
-
#specified_pab_interest_dividend ⇒ Float
Box 13, Specified private activity bond interest dividends.
-
#state_and_local ⇒ Array[StateAndLocalTaxWithholding]
Boxes 14-16, State and Local tax withholding.
-
#state_tax_exempt_incomes ⇒ Array[DescriptionAndAmount]
State tax exempt income information, with state code or name as description and state tax exempt income as amount.
-
#tax_exempt_incomes ⇒ Array[TaxExemptIncomeStateAllocation]
Tax exempt income by fund information.
-
#tax_exempt_interest_dividend ⇒ Float
Box 12, Exempt-interest dividends.
-
#tax_form_date ⇒ Date
Date of production or delivery of the tax form.
-
#tax_form_id ⇒ String
Long-term persistent id for this tax form.
-
#tax_form_type ⇒ TypeFormType1
Enumerated name of the tax form entity e.g.
-
#tax_year ⇒ Integer
Year for which taxes are being paid.
-
#total_capital_gain ⇒ Float
Box 2a, Total capital gain distributions.
-
#unrecaptured1250_gain ⇒ Float
Box 2b, Unrecaptured Section 1250 gain.
-
#us_security_incomes ⇒ Array[UsGovernmentSecurityIncome]
Details of earnings from US government securities.
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(tax_year: SKIP, corrected: SKIP, account_id: SKIP, tax_form_id: SKIP, tax_form_date: SKIP, additional_information: SKIP, tax_form_type: SKIP, issuer: SKIP, recipient: SKIP, attributes: SKIP, error: SKIP, links: SKIP, account_number: SKIP, ordinary_dividends: SKIP, qualified_dividends: SKIP, qualified_dividends_not_eligible: SKIP, total_capital_gain: SKIP, unrecaptured1250_gain: SKIP, section1202_gain: SKIP, collectibles_gain: SKIP, section897_dividends: SKIP, section897_capital_gain: SKIP, non_taxable_distribution: SKIP, federal_tax_withheld: SKIP, section199_a_dividends: SKIP, investment_expenses: SKIP, foreign_tax_paid: SKIP, foreign_country: SKIP, cash_liquidation: SKIP, non_cash_liquidation: SKIP, foreign_account_tax_compliance: SKIP, tax_exempt_interest_dividend: SKIP, specified_pab_interest_dividend: SKIP, state_and_local: SKIP, foreign_incomes: SKIP, foreign_source_incomes: SKIP, state_tax_exempt_incomes: SKIP, tax_exempt_incomes: SKIP, us_security_incomes: SKIP, second_tin_notice: SKIP, additional_properties: nil) ⇒ Form1099Div1
constructor
A new instance of Form1099Div1.
-
#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(tax_year: SKIP, corrected: SKIP, account_id: SKIP, tax_form_id: SKIP, tax_form_date: SKIP, additional_information: SKIP, tax_form_type: SKIP, issuer: SKIP, recipient: SKIP, attributes: SKIP, error: SKIP, links: SKIP, account_number: SKIP, ordinary_dividends: SKIP, qualified_dividends: SKIP, qualified_dividends_not_eligible: SKIP, total_capital_gain: SKIP, unrecaptured1250_gain: SKIP, section1202_gain: SKIP, collectibles_gain: SKIP, section897_dividends: SKIP, section897_capital_gain: SKIP, non_taxable_distribution: SKIP, federal_tax_withheld: SKIP, section199_a_dividends: SKIP, investment_expenses: SKIP, foreign_tax_paid: SKIP, foreign_country: SKIP, cash_liquidation: SKIP, non_cash_liquidation: SKIP, foreign_account_tax_compliance: SKIP, tax_exempt_interest_dividend: SKIP, specified_pab_interest_dividend: SKIP, state_and_local: SKIP, foreign_incomes: SKIP, foreign_source_incomes: SKIP, state_tax_exempt_incomes: SKIP, tax_exempt_incomes: SKIP, us_security_incomes: SKIP, second_tin_notice: SKIP, additional_properties: nil) ⇒ Form1099Div1
Returns a new instance of Form1099Div1.
290 291 292 293 294 295 296 297 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 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 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 290 def initialize(tax_year: SKIP, corrected: SKIP, account_id: SKIP, tax_form_id: SKIP, tax_form_date: SKIP, additional_information: SKIP, tax_form_type: SKIP, issuer: SKIP, recipient: SKIP, attributes: SKIP, error: SKIP, links: SKIP, account_number: SKIP, ordinary_dividends: SKIP, qualified_dividends: SKIP, qualified_dividends_not_eligible: SKIP, total_capital_gain: SKIP, unrecaptured1250_gain: SKIP, section1202_gain: SKIP, collectibles_gain: SKIP, section897_dividends: SKIP, section897_capital_gain: SKIP, non_taxable_distribution: SKIP, federal_tax_withheld: SKIP, section199_a_dividends: SKIP, investment_expenses: SKIP, foreign_tax_paid: SKIP, foreign_country: SKIP, cash_liquidation: SKIP, non_cash_liquidation: SKIP, foreign_account_tax_compliance: SKIP, tax_exempt_interest_dividend: SKIP, specified_pab_interest_dividend: SKIP, state_and_local: SKIP, foreign_incomes: SKIP, foreign_source_incomes: SKIP, state_tax_exempt_incomes: SKIP, tax_exempt_incomes: SKIP, us_security_incomes: SKIP, second_tin_notice: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @tax_year = tax_year unless tax_year == SKIP @corrected = corrected unless corrected == SKIP @account_id = account_id unless account_id == SKIP @tax_form_id = tax_form_id unless tax_form_id == SKIP @tax_form_date = tax_form_date unless tax_form_date == SKIP @additional_information = additional_information unless additional_information == SKIP @tax_form_type = tax_form_type unless tax_form_type == SKIP @issuer = issuer unless issuer == SKIP @recipient = recipient unless recipient == SKIP @attributes = attributes unless attributes == SKIP @error = error unless error == SKIP @links = links unless links == SKIP @account_number = account_number unless account_number == SKIP @ordinary_dividends = ordinary_dividends unless ordinary_dividends == SKIP @qualified_dividends = qualified_dividends unless qualified_dividends == SKIP unless qualified_dividends_not_eligible == SKIP @qualified_dividends_not_eligible = qualified_dividends_not_eligible end @total_capital_gain = total_capital_gain unless total_capital_gain == SKIP @unrecaptured1250_gain = unrecaptured1250_gain unless unrecaptured1250_gain == SKIP @section1202_gain = section1202_gain unless section1202_gain == SKIP @collectibles_gain = collectibles_gain unless collectibles_gain == SKIP @section897_dividends = section897_dividends unless section897_dividends == SKIP @section897_capital_gain = section897_capital_gain unless section897_capital_gain == SKIP @non_taxable_distribution = non_taxable_distribution unless non_taxable_distribution == SKIP @federal_tax_withheld = federal_tax_withheld unless federal_tax_withheld == SKIP @section199_a_dividends = section199_a_dividends unless section199_a_dividends == SKIP @investment_expenses = investment_expenses unless investment_expenses == SKIP @foreign_tax_paid = foreign_tax_paid unless foreign_tax_paid == SKIP @foreign_country = foreign_country unless foreign_country == SKIP @cash_liquidation = cash_liquidation unless cash_liquidation == SKIP @non_cash_liquidation = non_cash_liquidation unless non_cash_liquidation == SKIP unless foreign_account_tax_compliance == SKIP @foreign_account_tax_compliance = foreign_account_tax_compliance end unless tax_exempt_interest_dividend == SKIP @tax_exempt_interest_dividend = tax_exempt_interest_dividend end unless specified_pab_interest_dividend == SKIP @specified_pab_interest_dividend = specified_pab_interest_dividend end @state_and_local = state_and_local unless state_and_local == SKIP @foreign_incomes = foreign_incomes unless foreign_incomes == SKIP @foreign_source_incomes = foreign_source_incomes unless foreign_source_incomes == SKIP @state_tax_exempt_incomes = state_tax_exempt_incomes unless state_tax_exempt_incomes == SKIP @tax_exempt_incomes = tax_exempt_incomes unless tax_exempt_incomes == SKIP @us_security_incomes = us_security_incomes unless us_security_incomes == SKIP @second_tin_notice = second_tin_notice unless second_tin_notice == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
Long-term persistent identity of the source account. Not the account number
23 24 25 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 23 def account_id @account_id end |
#account_number ⇒ String
Account number
75 76 77 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 75 def account_number @account_number end |
#additional_information ⇒ String
Additional explanation text or content about this tax form
37 38 39 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 37 def additional_information @additional_information end |
#attributes ⇒ Array[TaxFormAttribute]
Additional attributes for this tax form when defined fields are not available. Some specific additional attributes already defined by providers: Fields required by [IRS FIRE](https://www.irs.gov/e-file-providers/filing-information-returns-elec tronically-fire): Name Control, Type of Identification Number (EIN, SSN, ITIN, ATIN). (ATIN is tax ID number for pending adoptions.) Tax form provider field for taxpayer notification: Recipient Email Address.
63 64 65 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 63 def attributes @attributes end |
#cash_liquidation ⇒ Float
Box 9, Cash liquidation distributions
140 141 142 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 140 def cash_liquidation @cash_liquidation end |
#collectibles_gain ⇒ Float
Box 2d, Collectibles (28%) gain
104 105 106 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 104 def collectibles_gain @collectibles_gain end |
#corrected ⇒ TrueClass | FalseClass
True to indicate this is a corrected tax form
18 19 20 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 18 def corrected @corrected end |
#error ⇒ Error2
Present if an error was encountered while retrieving this form
67 68 69 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 67 def error @error end |
#federal_tax_withheld ⇒ Float
Box 4, Federal income tax withheld
120 121 122 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 120 def federal_tax_withheld @federal_tax_withheld end |
#foreign_account_tax_compliance ⇒ TrueClass | FalseClass
Box 11, FATCA filing requirement
148 149 150 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 148 def foreign_account_tax_compliance @foreign_account_tax_compliance end |
#foreign_country ⇒ String
Box 8, Foreign country or U.S. possession
136 137 138 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 136 def foreign_country @foreign_country end |
#foreign_incomes ⇒ Array[DescriptionAndAmount]
Foreign income information, with country name or country code as description and total foreign income as amount. Deprecated and replaced with foreignSourceIncomes array of ForeignSourceDividendIncome in FDX Summer Release 2026
167 168 169 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 167 def foreign_incomes @foreign_incomes end |
#foreign_source_incomes ⇒ Array[ForeignSourceDividendIncome]
Details of income types from foreign sources into qualifiedDividends, nonQualifiedDividends and capitalGains
172 173 174 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 172 def foreign_source_incomes @foreign_source_incomes end |
#foreign_tax_paid ⇒ Float
Box 7, Foreign tax paid
132 133 134 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 132 def foreign_tax_paid @foreign_tax_paid end |
#investment_expenses ⇒ Float
Box 6, Investment expenses
128 129 130 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 128 def investment_expenses @investment_expenses end |
#issuer ⇒ TaxParty8
Issuer's name, address, phone, and TIN. Issuer data need only be transmitted on enclosing TaxStatement, if it is the same on all its included tax forms.
47 48 49 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 47 def issuer @issuer end |
#links ⇒ Array[HateoasLink]
Links to retrieve this form as data or image, or to invoke other APIs
71 72 73 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 71 def links @links end |
#non_cash_liquidation ⇒ Float
Box 10, Noncash liquidation distributions
144 145 146 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 144 def non_cash_liquidation @non_cash_liquidation end |
#non_taxable_distribution ⇒ Float
Box 3, Nondividend distributions
116 117 118 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 116 def non_taxable_distribution @non_taxable_distribution end |
#ordinary_dividends ⇒ Float
Box 1a, Total ordinary dividends
79 80 81 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 79 def ordinary_dividends @ordinary_dividends end |
#qualified_dividends ⇒ Float
Box 1b, Qualified dividends
83 84 85 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 83 def qualified_dividends @qualified_dividends end |
#qualified_dividends_not_eligible ⇒ Float
Portion of qualified dividends not eligible for capital gains rates due to not meeting holding period requirements, if known
88 89 90 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 88 def qualified_dividends_not_eligible @qualified_dividends_not_eligible end |
#recipient ⇒ TaxParty1
Recipient's name, address, phone, and TIN. Recipient data need only be transmitted on enclosing TaxStatement, if it is the same on all its included tax forms.
53 54 55 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 53 def recipient @recipient end |
#second_tin_notice ⇒ TrueClass | FalseClass
Second TIN Notice
189 190 191 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 189 def second_tin_notice @second_tin_notice end |
#section1202_gain ⇒ Float
Box 2c, Section 1202 gain
100 101 102 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 100 def section1202_gain @section1202_gain end |
#section199_a_dividends ⇒ Float
Box 5, Section 199A dividends
124 125 126 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 124 def section199_a_dividends @section199_a_dividends end |
#section897_capital_gain ⇒ Float
Box 2f, Section 897 capital gain
112 113 114 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 112 def section897_capital_gain @section897_capital_gain end |
#section897_dividends ⇒ Float
Box 2e, Section 897 ordinary dividends
108 109 110 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 108 def section897_dividends @section897_dividends end |
#specified_pab_interest_dividend ⇒ Float
Box 13, Specified private activity bond interest dividends
156 157 158 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 156 def specified_pab_interest_dividend @specified_pab_interest_dividend end |
#state_and_local ⇒ Array[StateAndLocalTaxWithholding]
Boxes 14-16, State and Local tax withholding
160 161 162 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 160 def state_and_local @state_and_local end |
#state_tax_exempt_incomes ⇒ Array[DescriptionAndAmount]
State tax exempt income information, with state code or name as description and state tax exempt income as amount
177 178 179 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 177 def state_tax_exempt_incomes @state_tax_exempt_incomes end |
#tax_exempt_incomes ⇒ Array[TaxExemptIncomeStateAllocation]
Tax exempt income by fund information
181 182 183 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 181 def tax_exempt_incomes @tax_exempt_incomes end |
#tax_exempt_interest_dividend ⇒ Float
Box 12, Exempt-interest dividends
152 153 154 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 152 def tax_exempt_interest_dividend @tax_exempt_interest_dividend end |
#tax_form_date ⇒ Date
Date of production or delivery of the tax form
33 34 35 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 33 def tax_form_date @tax_form_date end |
#tax_form_id ⇒ String
Long-term persistent id for this tax form. Depending upon the data provider, this may be the same id as the enclosing tax statement id, or this may be a different id, or this id may be omitted.
29 30 31 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 29 def tax_form_id @tax_form_id end |
#tax_form_type ⇒ TypeFormType1
Enumerated name of the tax form entity e.g. "TaxW2"
41 42 43 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 41 def tax_form_type @tax_form_type end |
#tax_year ⇒ Integer
Year for which taxes are being paid
14 15 16 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 14 def tax_year @tax_year end |
#total_capital_gain ⇒ Float
Box 2a, Total capital gain distributions
92 93 94 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 92 def total_capital_gain @total_capital_gain end |
#unrecaptured1250_gain ⇒ Float
Box 2b, Unrecaptured Section 1250 gain
96 97 98 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 96 def unrecaptured1250_gain @unrecaptured1250_gain end |
#us_security_incomes ⇒ Array[UsGovernmentSecurityIncome]
Details of earnings from US government securities
185 186 187 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 185 def us_security_incomes @us_security_incomes end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 370 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. tax_year = hash.key?('taxYear') ? hash['taxYear'] : SKIP corrected = hash.key?('corrected') ? hash['corrected'] : SKIP account_id = hash.key?('accountId') ? hash['accountId'] : SKIP tax_form_id = hash.key?('taxFormId') ? hash['taxFormId'] : SKIP tax_form_date = hash.key?('taxFormDate') ? hash['taxFormDate'] : SKIP additional_information = hash.key?('additionalInformation') ? hash['additionalInformation'] : SKIP tax_form_type = hash.key?('taxFormType') ? hash['taxFormType'] : SKIP issuer = TaxParty8.from_hash(hash['issuer']) if hash['issuer'] recipient = TaxParty1.from_hash(hash['recipient']) if hash['recipient'] # Parameter is an array, so we need to iterate through it attributes = nil unless hash['attributes'].nil? attributes = [] hash['attributes'].each do |structure| attributes << (TaxFormAttribute.from_hash(structure) if structure) end end attributes = SKIP unless hash.key?('attributes') error = Error2.from_hash(hash['error']) if hash['error'] # Parameter is an array, so we need to iterate through it links = nil unless hash['links'].nil? links = [] hash['links'].each do |structure| links << (HateoasLink.from_hash(structure) if structure) end end links = SKIP unless hash.key?('links') account_number = hash.key?('accountNumber') ? hash['accountNumber'] : SKIP ordinary_dividends = hash.key?('ordinaryDividends') ? hash['ordinaryDividends'] : SKIP qualified_dividends = hash.key?('qualifiedDividends') ? hash['qualifiedDividends'] : SKIP qualified_dividends_not_eligible = hash.key?('qualifiedDividendsNotEligible') ? hash['qualifiedDividendsNotEligible'] : SKIP total_capital_gain = hash.key?('totalCapitalGain') ? hash['totalCapitalGain'] : SKIP unrecaptured1250_gain = hash.key?('unrecaptured1250Gain') ? hash['unrecaptured1250Gain'] : SKIP section1202_gain = hash.key?('section1202Gain') ? hash['section1202Gain'] : SKIP collectibles_gain = hash.key?('collectiblesGain') ? hash['collectiblesGain'] : SKIP section897_dividends = hash.key?('section897Dividends') ? hash['section897Dividends'] : SKIP section897_capital_gain = hash.key?('section897CapitalGain') ? hash['section897CapitalGain'] : SKIP non_taxable_distribution = hash.key?('nonTaxableDistribution') ? hash['nonTaxableDistribution'] : SKIP federal_tax_withheld = hash.key?('federalTaxWithheld') ? hash['federalTaxWithheld'] : SKIP section199_a_dividends = hash.key?('section199ADividends') ? hash['section199ADividends'] : SKIP investment_expenses = hash.key?('investmentExpenses') ? hash['investmentExpenses'] : SKIP foreign_tax_paid = hash.key?('foreignTaxPaid') ? hash['foreignTaxPaid'] : SKIP foreign_country = hash.key?('foreignCountry') ? hash['foreignCountry'] : SKIP cash_liquidation = hash.key?('cashLiquidation') ? hash['cashLiquidation'] : SKIP non_cash_liquidation = hash.key?('nonCashLiquidation') ? hash['nonCashLiquidation'] : SKIP foreign_account_tax_compliance = hash.key?('foreignAccountTaxCompliance') ? hash['foreignAccountTaxCompliance'] : SKIP tax_exempt_interest_dividend = hash.key?('taxExemptInterestDividend') ? hash['taxExemptInterestDividend'] : SKIP specified_pab_interest_dividend = hash.key?('specifiedPabInterestDividend') ? hash['specifiedPabInterestDividend'] : SKIP # Parameter is an array, so we need to iterate through it state_and_local = nil unless hash['stateAndLocal'].nil? state_and_local = [] hash['stateAndLocal'].each do |structure| state_and_local << (StateAndLocalTaxWithholding.from_hash(structure) if structure) end end state_and_local = SKIP unless hash.key?('stateAndLocal') # Parameter is an array, so we need to iterate through it foreign_incomes = nil unless hash['foreignIncomes'].nil? foreign_incomes = [] hash['foreignIncomes'].each do |structure| foreign_incomes << (DescriptionAndAmount.from_hash(structure) if structure) end end foreign_incomes = SKIP unless hash.key?('foreignIncomes') # Parameter is an array, so we need to iterate through it foreign_source_incomes = nil unless hash['foreignSourceIncomes'].nil? foreign_source_incomes = [] hash['foreignSourceIncomes'].each do |structure| foreign_source_incomes << (ForeignSourceDividendIncome.from_hash(structure) if structure) end end foreign_source_incomes = SKIP unless hash.key?('foreignSourceIncomes') # Parameter is an array, so we need to iterate through it state_tax_exempt_incomes = nil unless hash['stateTaxExemptIncomes'].nil? state_tax_exempt_incomes = [] hash['stateTaxExemptIncomes'].each do |structure| state_tax_exempt_incomes << (DescriptionAndAmount.from_hash(structure) if structure) end end state_tax_exempt_incomes = SKIP unless hash.key?('stateTaxExemptIncomes') # Parameter is an array, so we need to iterate through it tax_exempt_incomes = nil unless hash['taxExemptIncomes'].nil? tax_exempt_incomes = [] hash['taxExemptIncomes'].each do |structure| tax_exempt_incomes << (TaxExemptIncomeStateAllocation.from_hash(structure) if structure) end end tax_exempt_incomes = SKIP unless hash.key?('taxExemptIncomes') # Parameter is an array, so we need to iterate through it us_security_incomes = nil unless hash['usSecurityIncomes'].nil? us_security_incomes = [] hash['usSecurityIncomes'].each do |structure| us_security_incomes << (UsGovernmentSecurityIncome.from_hash(structure) if structure) end end us_security_incomes = SKIP unless hash.key?('usSecurityIncomes') second_tin_notice = hash.key?('secondTinNotice') ? hash['secondTinNotice'] : 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. Form1099Div1.new(tax_year: tax_year, corrected: corrected, account_id: account_id, tax_form_id: tax_form_id, tax_form_date: tax_form_date, additional_information: additional_information, tax_form_type: tax_form_type, issuer: issuer, recipient: recipient, attributes: attributes, error: error, links: links, account_number: account_number, ordinary_dividends: ordinary_dividends, qualified_dividends: qualified_dividends, qualified_dividends_not_eligible: qualified_dividends_not_eligible, total_capital_gain: total_capital_gain, unrecaptured1250_gain: unrecaptured1250_gain, section1202_gain: section1202_gain, collectibles_gain: collectibles_gain, section897_dividends: section897_dividends, section897_capital_gain: section897_capital_gain, non_taxable_distribution: non_taxable_distribution, federal_tax_withheld: federal_tax_withheld, section199_a_dividends: section199_a_dividends, investment_expenses: investment_expenses, foreign_tax_paid: foreign_tax_paid, foreign_country: foreign_country, cash_liquidation: cash_liquidation, non_cash_liquidation: non_cash_liquidation, foreign_account_tax_compliance: foreign_account_tax_compliance, tax_exempt_interest_dividend: tax_exempt_interest_dividend, specified_pab_interest_dividend: specified_pab_interest_dividend, state_and_local: state_and_local, foreign_incomes: foreign_incomes, foreign_source_incomes: foreign_source_incomes, state_tax_exempt_incomes: state_tax_exempt_incomes, tax_exempt_incomes: tax_exempt_incomes, us_security_incomes: us_security_incomes, second_tin_notice: second_tin_notice, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
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 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 192 def self.names @_hash = {} if @_hash.nil? @_hash['tax_year'] = 'taxYear' @_hash['corrected'] = 'corrected' @_hash['account_id'] = 'accountId' @_hash['tax_form_id'] = 'taxFormId' @_hash['tax_form_date'] = 'taxFormDate' @_hash['additional_information'] = 'additionalInformation' @_hash['tax_form_type'] = 'taxFormType' @_hash['issuer'] = 'issuer' @_hash['recipient'] = 'recipient' @_hash['attributes'] = 'attributes' @_hash['error'] = 'error' @_hash['links'] = 'links' @_hash['account_number'] = 'accountNumber' @_hash['ordinary_dividends'] = 'ordinaryDividends' @_hash['qualified_dividends'] = 'qualifiedDividends' @_hash['qualified_dividends_not_eligible'] = 'qualifiedDividendsNotEligible' @_hash['total_capital_gain'] = 'totalCapitalGain' @_hash['unrecaptured1250_gain'] = 'unrecaptured1250Gain' @_hash['section1202_gain'] = 'section1202Gain' @_hash['collectibles_gain'] = 'collectiblesGain' @_hash['section897_dividends'] = 'section897Dividends' @_hash['section897_capital_gain'] = 'section897CapitalGain' @_hash['non_taxable_distribution'] = 'nonTaxableDistribution' @_hash['federal_tax_withheld'] = 'federalTaxWithheld' @_hash['section199_a_dividends'] = 'section199ADividends' @_hash['investment_expenses'] = 'investmentExpenses' @_hash['foreign_tax_paid'] = 'foreignTaxPaid' @_hash['foreign_country'] = 'foreignCountry' @_hash['cash_liquidation'] = 'cashLiquidation' @_hash['non_cash_liquidation'] = 'nonCashLiquidation' @_hash['foreign_account_tax_compliance'] = 'foreignAccountTaxCompliance' @_hash['tax_exempt_interest_dividend'] = 'taxExemptInterestDividend' @_hash['specified_pab_interest_dividend'] = 'specifiedPabInterestDividend' @_hash['state_and_local'] = 'stateAndLocal' @_hash['foreign_incomes'] = 'foreignIncomes' @_hash['foreign_source_incomes'] = 'foreignSourceIncomes' @_hash['state_tax_exempt_incomes'] = 'stateTaxExemptIncomes' @_hash['tax_exempt_incomes'] = 'taxExemptIncomes' @_hash['us_security_incomes'] = 'usSecurityIncomes' @_hash['second_tin_notice'] = 'secondTinNotice' @_hash end |
.nullables ⇒ Object
An array for nullable fields
286 287 288 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 286 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 240 def self.optionals %w[ tax_year corrected account_id tax_form_id tax_form_date additional_information tax_form_type issuer recipient attributes error links account_number ordinary_dividends qualified_dividends qualified_dividends_not_eligible total_capital_gain unrecaptured1250_gain section1202_gain collectibles_gain section897_dividends section897_capital_gain non_taxable_distribution federal_tax_withheld section199_a_dividends investment_expenses foreign_tax_paid foreign_country cash_liquidation non_cash_liquidation foreign_account_tax_compliance tax_exempt_interest_dividend specified_pab_interest_dividend state_and_local foreign_incomes foreign_source_incomes state_tax_exempt_incomes tax_exempt_incomes us_security_incomes second_tin_notice ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 589 def inspect class_name = self.class.name.split('::').last "<#{class_name} tax_year: #{@tax_year.inspect}, corrected: #{@corrected.inspect},"\ " account_id: #{@account_id.inspect}, tax_form_id: #{@tax_form_id.inspect}, tax_form_date:"\ " #{@tax_form_date.inspect}, additional_information: #{@additional_information.inspect},"\ " tax_form_type: #{@tax_form_type.inspect}, issuer: #{@issuer.inspect}, recipient:"\ " #{@recipient.inspect}, attributes: #{@attributes.inspect}, error: #{@error.inspect},"\ " links: #{@links.inspect}, account_number: #{@account_number.inspect}, ordinary_dividends:"\ " #{@ordinary_dividends.inspect}, qualified_dividends: #{@qualified_dividends.inspect},"\ " qualified_dividends_not_eligible: #{@qualified_dividends_not_eligible.inspect},"\ " total_capital_gain: #{@total_capital_gain.inspect}, unrecaptured1250_gain:"\ " #{@unrecaptured1250_gain.inspect}, section1202_gain: #{@section1202_gain.inspect},"\ " collectibles_gain: #{@collectibles_gain.inspect}, section897_dividends:"\ " #{@section897_dividends.inspect}, section897_capital_gain:"\ " #{@section897_capital_gain.inspect}, non_taxable_distribution:"\ " #{@non_taxable_distribution.inspect}, federal_tax_withheld:"\ " #{@federal_tax_withheld.inspect}, section199_a_dividends:"\ " #{@section199_a_dividends.inspect}, investment_expenses: #{@investment_expenses.inspect},"\ " foreign_tax_paid: #{@foreign_tax_paid.inspect}, foreign_country:"\ " #{@foreign_country.inspect}, cash_liquidation: #{@cash_liquidation.inspect},"\ " non_cash_liquidation: #{@non_cash_liquidation.inspect}, foreign_account_tax_compliance:"\ " #{@foreign_account_tax_compliance.inspect}, tax_exempt_interest_dividend:"\ " #{@tax_exempt_interest_dividend.inspect}, specified_pab_interest_dividend:"\ " #{@specified_pab_interest_dividend.inspect}, state_and_local: #{@state_and_local.inspect},"\ " foreign_incomes: #{@foreign_incomes.inspect}, foreign_source_incomes:"\ " #{@foreign_source_incomes.inspect}, state_tax_exempt_incomes:"\ " #{@state_tax_exempt_incomes.inspect}, tax_exempt_incomes: #{@tax_exempt_incomes.inspect},"\ " us_security_incomes: #{@us_security_incomes.inspect}, second_tin_notice:"\ " #{@second_tin_notice.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 |
# File 'lib/fdx_v660_api/models/form1099_div1.rb', line 561 def to_s class_name = self.class.name.split('::').last "<#{class_name} tax_year: #{@tax_year}, corrected: #{@corrected}, account_id:"\ " #{@account_id}, tax_form_id: #{@tax_form_id}, tax_form_date: #{@tax_form_date},"\ " additional_information: #{@additional_information}, tax_form_type: #{@tax_form_type},"\ " issuer: #{@issuer}, recipient: #{@recipient}, attributes: #{@attributes}, error:"\ " #{@error}, links: #{@links}, account_number: #{@account_number}, ordinary_dividends:"\ " #{@ordinary_dividends}, qualified_dividends: #{@qualified_dividends},"\ " qualified_dividends_not_eligible: #{@qualified_dividends_not_eligible},"\ " total_capital_gain: #{@total_capital_gain}, unrecaptured1250_gain:"\ " #{@unrecaptured1250_gain}, section1202_gain: #{@section1202_gain}, collectibles_gain:"\ " #{@collectibles_gain}, section897_dividends: #{@section897_dividends},"\ " section897_capital_gain: #{@section897_capital_gain}, non_taxable_distribution:"\ " #{@non_taxable_distribution}, federal_tax_withheld: #{@federal_tax_withheld},"\ " section199_a_dividends: #{@section199_a_dividends}, investment_expenses:"\ " #{@investment_expenses}, foreign_tax_paid: #{@foreign_tax_paid}, foreign_country:"\ " #{@foreign_country}, cash_liquidation: #{@cash_liquidation}, non_cash_liquidation:"\ " #{@non_cash_liquidation}, foreign_account_tax_compliance:"\ " #{@foreign_account_tax_compliance}, tax_exempt_interest_dividend:"\ " #{@tax_exempt_interest_dividend}, specified_pab_interest_dividend:"\ " #{@specified_pab_interest_dividend}, state_and_local: #{@state_and_local},"\ " foreign_incomes: #{@foreign_incomes}, foreign_source_incomes: #{@foreign_source_incomes},"\ " state_tax_exempt_incomes: #{@state_tax_exempt_incomes}, tax_exempt_incomes:"\ " #{@tax_exempt_incomes}, us_security_incomes: #{@us_security_incomes}, second_tin_notice:"\ " #{@second_tin_notice}, additional_properties: #{@additional_properties}>" end |