Class: FdxV660Api::Form1099Div
- Defined in:
- lib/fdx_v660_api/models/form1099_div.rb
Overview
Dividends and Distributions, from PAYER (1st-2nd boxes as issuer) to RECIPIENT (3rd-6th boxes)
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) ⇒ Form1099Div
constructor
A new instance of Form1099Div.
-
#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) ⇒ Form1099Div
Returns a new instance of Form1099Div.
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 368 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 291 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
24 25 26 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 24 def account_id @account_id end |
#account_number ⇒ String
Account number
76 77 78 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 76 def account_number @account_number end |
#additional_information ⇒ String
Additional explanation text or content about this tax form
38 39 40 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 38 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.
64 65 66 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 64 def attributes @attributes end |
#cash_liquidation ⇒ Float
Box 9, Cash liquidation distributions
141 142 143 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 141 def cash_liquidation @cash_liquidation end |
#collectibles_gain ⇒ Float
Box 2d, Collectibles (28%) gain
105 106 107 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 105 def collectibles_gain @collectibles_gain end |
#corrected ⇒ TrueClass | FalseClass
True to indicate this is a corrected tax form
19 20 21 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 19 def corrected @corrected end |
#error ⇒ Error2
Present if an error was encountered while retrieving this form
68 69 70 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 68 def error @error end |
#federal_tax_withheld ⇒ Float
Box 4, Federal income tax withheld
121 122 123 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 121 def federal_tax_withheld @federal_tax_withheld end |
#foreign_account_tax_compliance ⇒ TrueClass | FalseClass
Box 11, FATCA filing requirement
149 150 151 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 149 def foreign_account_tax_compliance @foreign_account_tax_compliance end |
#foreign_country ⇒ String
Box 8, Foreign country or U.S. possession
137 138 139 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 137 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
168 169 170 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 168 def foreign_incomes @foreign_incomes end |
#foreign_source_incomes ⇒ Array[ForeignSourceDividendIncome]
Details of income types from foreign sources into qualifiedDividends, nonQualifiedDividends and capitalGains
173 174 175 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 173 def foreign_source_incomes @foreign_source_incomes end |
#foreign_tax_paid ⇒ Float
Box 7, Foreign tax paid
133 134 135 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 133 def foreign_tax_paid @foreign_tax_paid end |
#investment_expenses ⇒ Float
Box 6, Investment expenses
129 130 131 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 129 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.
48 49 50 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 48 def issuer @issuer end |
#links ⇒ Array[HateoasLink]
Links to retrieve this form as data or image, or to invoke other APIs
72 73 74 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 72 def links @links end |
#non_cash_liquidation ⇒ Float
Box 10, Noncash liquidation distributions
145 146 147 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 145 def non_cash_liquidation @non_cash_liquidation end |
#non_taxable_distribution ⇒ Float
Box 3, Nondividend distributions
117 118 119 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 117 def non_taxable_distribution @non_taxable_distribution end |
#ordinary_dividends ⇒ Float
Box 1a, Total ordinary dividends
80 81 82 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 80 def ordinary_dividends @ordinary_dividends end |
#qualified_dividends ⇒ Float
Box 1b, Qualified dividends
84 85 86 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 84 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
89 90 91 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 89 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.
54 55 56 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 54 def recipient @recipient end |
#second_tin_notice ⇒ TrueClass | FalseClass
Second TIN Notice
190 191 192 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 190 def second_tin_notice @second_tin_notice end |
#section1202_gain ⇒ Float
Box 2c, Section 1202 gain
101 102 103 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 101 def section1202_gain @section1202_gain end |
#section199_a_dividends ⇒ Float
Box 5, Section 199A dividends
125 126 127 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 125 def section199_a_dividends @section199_a_dividends end |
#section897_capital_gain ⇒ Float
Box 2f, Section 897 capital gain
113 114 115 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 113 def section897_capital_gain @section897_capital_gain end |
#section897_dividends ⇒ Float
Box 2e, Section 897 ordinary dividends
109 110 111 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 109 def section897_dividends @section897_dividends end |
#specified_pab_interest_dividend ⇒ Float
Box 13, Specified private activity bond interest dividends
157 158 159 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 157 def specified_pab_interest_dividend @specified_pab_interest_dividend end |
#state_and_local ⇒ Array[StateAndLocalTaxWithholding]
Boxes 14-16, State and Local tax withholding
161 162 163 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 161 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
178 179 180 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 178 def state_tax_exempt_incomes @state_tax_exempt_incomes end |
#tax_exempt_incomes ⇒ Array[TaxExemptIncomeStateAllocation]
Tax exempt income by fund information
182 183 184 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 182 def tax_exempt_incomes @tax_exempt_incomes end |
#tax_exempt_interest_dividend ⇒ Float
Box 12, Exempt-interest dividends
153 154 155 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 153 def tax_exempt_interest_dividend @tax_exempt_interest_dividend end |
#tax_form_date ⇒ Date
Date of production or delivery of the tax form
34 35 36 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 34 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.
30 31 32 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 30 def tax_form_id @tax_form_id end |
#tax_form_type ⇒ TypeFormType1
Enumerated name of the tax form entity e.g. "TaxW2"
42 43 44 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 42 def tax_form_type @tax_form_type end |
#tax_year ⇒ Integer
Year for which taxes are being paid
15 16 17 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 15 def tax_year @tax_year end |
#total_capital_gain ⇒ Float
Box 2a, Total capital gain distributions
93 94 95 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 93 def total_capital_gain @total_capital_gain end |
#unrecaptured1250_gain ⇒ Float
Box 2b, Unrecaptured Section 1250 gain
97 98 99 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 97 def unrecaptured1250_gain @unrecaptured1250_gain end |
#us_security_incomes ⇒ Array[UsGovernmentSecurityIncome]
Details of earnings from US government securities
186 187 188 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 186 def us_security_incomes @us_security_incomes end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 559 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 371 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. Form1099Div.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.
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 238 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 193 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
287 288 289 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 287 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
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 284 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 241 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.
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 619 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 590 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.
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 587 |
# File 'lib/fdx_v660_api/models/form1099_div.rb', line 562 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 |