Class: FdxV660Api::Form1099Int
- Defined in:
- lib/fdx_v660_api/models/form1099_int.rb
Overview
Interest Income, from PAYER (1st-2nd boxes as issuer) to RECIPIENT (3rd-4th boxes)
Instance Attribute Summary collapse
-
#account_id ⇒ String
Long-term persistent identity of the source account.
-
#account_number ⇒ String
Account number.
-
#accrued_interest_adjustment ⇒ Float
Adjustment for accrued interest.
-
#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.
-
#bond_premium ⇒ Float
Box 11, Bond premium.
-
#bond_premium_adjustment ⇒ Float
Adjustment for amortizable bond premium.
-
#corrected ⇒ TrueClass | FalseClass
True to indicate this is a corrected tax form.
-
#cusip_number ⇒ String
Box 14, Tax-exempt bond CUSIP no.
-
#early_withdrawal_penalty ⇒ Float
Box 2, Early withdrawal penalty.
-
#error ⇒ Error2
Present if an error was encountered while retrieving this form.
-
#exempt_bond_premium_adjustment ⇒ Float
Adjustment for amortizable bond premium on tax-exempt bonds.
-
#federal_tax_withheld ⇒ Float
Box 4, Federal income tax withheld.
-
#foreign_account_tax_compliance ⇒ TrueClass | FalseClass
FATCA filing requirement.
-
#foreign_country ⇒ String
Box 7, Foreign country or U.S.
-
#foreign_incomes ⇒ Array[DescriptionAndAmount]
Supplemental foreign income amount information (description is country).
-
#foreign_tax_paid ⇒ Float
Box 6, Foreign tax paid.
-
#interest_income ⇒ Float
Box 1, Interest income.
-
#investment_expenses ⇒ Float
Box 5, 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.
-
#market_discount ⇒ Float
Box 10, Market discount.
-
#nominee_adjustment ⇒ Float
Adjustment for interest received as nominee.
-
#oid_adjustment ⇒ Float
Adjustment for original issue discount.
-
#other_adjustment ⇒ Float
Other adjustment.
-
#payer_rtn ⇒ String
Payer's RTN.
-
#private_activity_bond_adjustment ⇒ Float
Adjustment for amortizable bond premium on specified private activity bonds.
-
#recipient ⇒ TaxParty1
Recipient's name, address, phone, and TIN.
-
#second_tin_notice ⇒ TrueClass | FalseClass
Second TIN Notice.
-
#specified_pab_interest ⇒ Float
Box 9, Specified private activity bond interest.
-
#state_and_local ⇒ Array[StateAndLocalTaxWithholding]
Boxes 15-17, State and Local tax withholding.
-
#state_tax_exempt_income ⇒ Array[DescriptionAndAmount]
Supplemental tax-exempt income by state (description is state).
-
#tax_exempt_bond_premium ⇒ Float
Box 13, Bond premium on tax-exempt bond.
-
#tax_exempt_interest ⇒ Float
Box 8, Tax-exempt interest.
-
#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.
-
#us_bond_interest ⇒ Float
Box 3, Interest on U.S.
-
#us_bond_premium ⇒ Float
Box 12, Bond premium on Treasury obligations.
-
#us_bond_premium_adjustment ⇒ Float
Adjustment for amortizable bond premium on US obligations.
-
#us_savings_bond_adjustment ⇒ Float
Adjustment for US savings bond interest previously reported.
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, foreign_account_tax_compliance: SKIP, account_number: SKIP, payer_rtn: SKIP, interest_income: SKIP, early_withdrawal_penalty: SKIP, us_bond_interest: SKIP, federal_tax_withheld: SKIP, investment_expenses: SKIP, foreign_tax_paid: SKIP, foreign_country: SKIP, tax_exempt_interest: SKIP, specified_pab_interest: SKIP, market_discount: SKIP, bond_premium: SKIP, us_bond_premium: SKIP, tax_exempt_bond_premium: SKIP, cusip_number: SKIP, state_and_local: SKIP, foreign_incomes: SKIP, state_tax_exempt_income: SKIP, nominee_adjustment: SKIP, oid_adjustment: SKIP, bond_premium_adjustment: SKIP, us_bond_premium_adjustment: SKIP, exempt_bond_premium_adjustment: SKIP, private_activity_bond_adjustment: SKIP, accrued_interest_adjustment: SKIP, us_savings_bond_adjustment: SKIP, other_adjustment: SKIP, second_tin_notice: SKIP, additional_properties: nil) ⇒ Form1099Int
constructor
A new instance of Form1099Int.
-
#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, foreign_account_tax_compliance: SKIP, account_number: SKIP, payer_rtn: SKIP, interest_income: SKIP, early_withdrawal_penalty: SKIP, us_bond_interest: SKIP, federal_tax_withheld: SKIP, investment_expenses: SKIP, foreign_tax_paid: SKIP, foreign_country: SKIP, tax_exempt_interest: SKIP, specified_pab_interest: SKIP, market_discount: SKIP, bond_premium: SKIP, us_bond_premium: SKIP, tax_exempt_bond_premium: SKIP, cusip_number: SKIP, state_and_local: SKIP, foreign_incomes: SKIP, state_tax_exempt_income: SKIP, nominee_adjustment: SKIP, oid_adjustment: SKIP, bond_premium_adjustment: SKIP, us_bond_premium_adjustment: SKIP, exempt_bond_premium_adjustment: SKIP, private_activity_bond_adjustment: SKIP, accrued_interest_adjustment: SKIP, us_savings_bond_adjustment: SKIP, other_adjustment: SKIP, second_tin_notice: SKIP, additional_properties: nil) ⇒ Form1099Int
Returns a new instance of Form1099Int.
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 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 297 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, foreign_account_tax_compliance: SKIP, account_number: SKIP, payer_rtn: SKIP, interest_income: SKIP, early_withdrawal_penalty: SKIP, us_bond_interest: SKIP, federal_tax_withheld: SKIP, investment_expenses: SKIP, foreign_tax_paid: SKIP, foreign_country: SKIP, tax_exempt_interest: SKIP, specified_pab_interest: SKIP, market_discount: SKIP, bond_premium: SKIP, us_bond_premium: SKIP, tax_exempt_bond_premium: SKIP, cusip_number: SKIP, state_and_local: SKIP, foreign_incomes: SKIP, state_tax_exempt_income: SKIP, nominee_adjustment: SKIP, oid_adjustment: SKIP, bond_premium_adjustment: SKIP, us_bond_premium_adjustment: SKIP, exempt_bond_premium_adjustment: SKIP, private_activity_bond_adjustment: SKIP, accrued_interest_adjustment: SKIP, us_savings_bond_adjustment: SKIP, other_adjustment: 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 unless foreign_account_tax_compliance == SKIP @foreign_account_tax_compliance = foreign_account_tax_compliance end @account_number = account_number unless account_number == SKIP @payer_rtn = payer_rtn unless payer_rtn == SKIP @interest_income = interest_income unless interest_income == SKIP @early_withdrawal_penalty = early_withdrawal_penalty unless early_withdrawal_penalty == SKIP @us_bond_interest = us_bond_interest unless us_bond_interest == SKIP @federal_tax_withheld = federal_tax_withheld unless federal_tax_withheld == 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 @tax_exempt_interest = tax_exempt_interest unless tax_exempt_interest == SKIP @specified_pab_interest = specified_pab_interest unless specified_pab_interest == SKIP @market_discount = market_discount unless market_discount == SKIP @bond_premium = bond_premium unless bond_premium == SKIP @us_bond_premium = us_bond_premium unless us_bond_premium == SKIP @tax_exempt_bond_premium = tax_exempt_bond_premium unless tax_exempt_bond_premium == SKIP @cusip_number = cusip_number unless cusip_number == SKIP @state_and_local = state_and_local unless state_and_local == SKIP @foreign_incomes = foreign_incomes unless foreign_incomes == SKIP @state_tax_exempt_income = state_tax_exempt_income unless state_tax_exempt_income == SKIP @nominee_adjustment = nominee_adjustment unless nominee_adjustment == SKIP @oid_adjustment = oid_adjustment unless oid_adjustment == SKIP @bond_premium_adjustment = bond_premium_adjustment unless bond_premium_adjustment == SKIP unless us_bond_premium_adjustment == SKIP @us_bond_premium_adjustment = us_bond_premium_adjustment end unless exempt_bond_premium_adjustment == SKIP @exempt_bond_premium_adjustment = exempt_bond_premium_adjustment end unless private_activity_bond_adjustment == SKIP @private_activity_bond_adjustment = private_activity_bond_adjustment end unless accrued_interest_adjustment == SKIP @accrued_interest_adjustment = accrued_interest_adjustment end unless us_savings_bond_adjustment == SKIP @us_savings_bond_adjustment = us_savings_bond_adjustment end @other_adjustment = other_adjustment unless other_adjustment == 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_int.rb', line 24 def account_id @account_id end |
#account_number ⇒ String
Account number
80 81 82 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 80 def account_number @account_number end |
#accrued_interest_adjustment ⇒ Float
Adjustment for accrued interest
181 182 183 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 181 def accrued_interest_adjustment @accrued_interest_adjustment end |
#additional_information ⇒ String
Additional explanation text or content about this tax form
38 39 40 |
# File 'lib/fdx_v660_api/models/form1099_int.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_int.rb', line 64 def attributes @attributes end |
#bond_premium ⇒ Float
Box 11, Bond premium
128 129 130 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 128 def bond_premium @bond_premium end |
#bond_premium_adjustment ⇒ Float
Adjustment for amortizable bond premium
164 165 166 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 164 def bond_premium_adjustment @bond_premium_adjustment end |
#corrected ⇒ TrueClass | FalseClass
True to indicate this is a corrected tax form
19 20 21 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 19 def corrected @corrected end |
#cusip_number ⇒ String
Box 14, Tax-exempt bond CUSIP no.
140 141 142 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 140 def cusip_number @cusip_number end |
#early_withdrawal_penalty ⇒ Float
Box 2, Early withdrawal penalty
92 93 94 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 92 def early_withdrawal_penalty @early_withdrawal_penalty end |
#error ⇒ Error2
Present if an error was encountered while retrieving this form
68 69 70 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 68 def error @error end |
#exempt_bond_premium_adjustment ⇒ Float
Adjustment for amortizable bond premium on tax-exempt bonds
172 173 174 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 172 def exempt_bond_premium_adjustment @exempt_bond_premium_adjustment end |
#federal_tax_withheld ⇒ Float
Box 4, Federal income tax withheld
100 101 102 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 100 def federal_tax_withheld @federal_tax_withheld end |
#foreign_account_tax_compliance ⇒ TrueClass | FalseClass
FATCA filing requirement
76 77 78 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 76 def foreign_account_tax_compliance @foreign_account_tax_compliance end |
#foreign_country ⇒ String
Box 7, Foreign country or U.S. possession
112 113 114 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 112 def foreign_country @foreign_country end |
#foreign_incomes ⇒ Array[DescriptionAndAmount]
Supplemental foreign income amount information (description is country)
148 149 150 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 148 def foreign_incomes @foreign_incomes end |
#foreign_tax_paid ⇒ Float
Box 6, Foreign tax paid
108 109 110 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 108 def foreign_tax_paid @foreign_tax_paid end |
#interest_income ⇒ Float
Box 1, Interest income
88 89 90 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 88 def interest_income @interest_income end |
#investment_expenses ⇒ Float
Box 5, Investment expenses
104 105 106 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 104 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_int.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_int.rb', line 72 def links @links end |
#market_discount ⇒ Float
Box 10, Market discount
124 125 126 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 124 def market_discount @market_discount end |
#nominee_adjustment ⇒ Float
Adjustment for interest received as nominee
156 157 158 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 156 def nominee_adjustment @nominee_adjustment end |
#oid_adjustment ⇒ Float
Adjustment for original issue discount
160 161 162 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 160 def oid_adjustment @oid_adjustment end |
#other_adjustment ⇒ Float
Other adjustment
189 190 191 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 189 def other_adjustment @other_adjustment end |
#payer_rtn ⇒ String
Payer's RTN
84 85 86 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 84 def payer_rtn @payer_rtn end |
#private_activity_bond_adjustment ⇒ Float
Adjustment for amortizable bond premium on specified private activity bonds
177 178 179 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 177 def private_activity_bond_adjustment @private_activity_bond_adjustment 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_int.rb', line 54 def recipient @recipient end |
#second_tin_notice ⇒ TrueClass | FalseClass
Second TIN Notice
193 194 195 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 193 def second_tin_notice @second_tin_notice end |
#specified_pab_interest ⇒ Float
Box 9, Specified private activity bond interest
120 121 122 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 120 def specified_pab_interest @specified_pab_interest end |
#state_and_local ⇒ Array[StateAndLocalTaxWithholding]
Boxes 15-17, State and Local tax withholding
144 145 146 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 144 def state_and_local @state_and_local end |
#state_tax_exempt_income ⇒ Array[DescriptionAndAmount]
Supplemental tax-exempt income by state (description is state)
152 153 154 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 152 def state_tax_exempt_income @state_tax_exempt_income end |
#tax_exempt_bond_premium ⇒ Float
Box 13, Bond premium on tax-exempt bond
136 137 138 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 136 def tax_exempt_bond_premium @tax_exempt_bond_premium end |
#tax_exempt_interest ⇒ Float
Box 8, Tax-exempt interest
116 117 118 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 116 def tax_exempt_interest @tax_exempt_interest end |
#tax_form_date ⇒ Date
Date of production or delivery of the tax form
34 35 36 |
# File 'lib/fdx_v660_api/models/form1099_int.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_int.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_int.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_int.rb', line 15 def tax_year @tax_year end |
#us_bond_interest ⇒ Float
Box 3, Interest on U.S. Savings Bonds and Treasury obligations
96 97 98 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 96 def us_bond_interest @us_bond_interest end |
#us_bond_premium ⇒ Float
Box 12, Bond premium on Treasury obligations
132 133 134 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 132 def us_bond_premium @us_bond_premium end |
#us_bond_premium_adjustment ⇒ Float
Adjustment for amortizable bond premium on US obligations
168 169 170 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 168 def us_bond_premium_adjustment @us_bond_premium_adjustment end |
#us_savings_bond_adjustment ⇒ Float
Adjustment for US savings bond interest previously reported
185 186 187 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 185 def us_savings_bond_adjustment @us_savings_bond_adjustment end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 386 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') foreign_account_tax_compliance = hash.key?('foreignAccountTaxCompliance') ? hash['foreignAccountTaxCompliance'] : SKIP account_number = hash.key?('accountNumber') ? hash['accountNumber'] : SKIP payer_rtn = hash.key?('payerRtn') ? hash['payerRtn'] : SKIP interest_income = hash.key?('interestIncome') ? hash['interestIncome'] : SKIP early_withdrawal_penalty = hash.key?('earlyWithdrawalPenalty') ? hash['earlyWithdrawalPenalty'] : SKIP us_bond_interest = hash.key?('usBondInterest') ? hash['usBondInterest'] : SKIP federal_tax_withheld = hash.key?('federalTaxWithheld') ? hash['federalTaxWithheld'] : 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 tax_exempt_interest = hash.key?('taxExemptInterest') ? hash['taxExemptInterest'] : SKIP specified_pab_interest = hash.key?('specifiedPabInterest') ? hash['specifiedPabInterest'] : SKIP market_discount = hash.key?('marketDiscount') ? hash['marketDiscount'] : SKIP bond_premium = hash.key?('bondPremium') ? hash['bondPremium'] : SKIP us_bond_premium = hash.key?('usBondPremium') ? hash['usBondPremium'] : SKIP tax_exempt_bond_premium = hash.key?('taxExemptBondPremium') ? hash['taxExemptBondPremium'] : SKIP cusip_number = hash.key?('cusipNumber') ? hash['cusipNumber'] : 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 state_tax_exempt_income = nil unless hash['stateTaxExemptIncome'].nil? state_tax_exempt_income = [] hash['stateTaxExemptIncome'].each do |structure| state_tax_exempt_income << (DescriptionAndAmount.from_hash(structure) if structure) end end state_tax_exempt_income = SKIP unless hash.key?('stateTaxExemptIncome') nominee_adjustment = hash.key?('nomineeAdjustment') ? hash['nomineeAdjustment'] : SKIP oid_adjustment = hash.key?('oidAdjustment') ? hash['oidAdjustment'] : SKIP bond_premium_adjustment = hash.key?('bondPremiumAdjustment') ? hash['bondPremiumAdjustment'] : SKIP us_bond_premium_adjustment = hash.key?('usBondPremiumAdjustment') ? hash['usBondPremiumAdjustment'] : SKIP exempt_bond_premium_adjustment = hash.key?('exemptBondPremiumAdjustment') ? hash['exemptBondPremiumAdjustment'] : SKIP private_activity_bond_adjustment = hash.key?('privateActivityBondAdjustment') ? hash['privateActivityBondAdjustment'] : SKIP accrued_interest_adjustment = hash.key?('accruedInterestAdjustment') ? hash['accruedInterestAdjustment'] : SKIP us_savings_bond_adjustment = hash.key?('usSavingsBondAdjustment') ? hash['usSavingsBondAdjustment'] : SKIP other_adjustment = hash.key?('otherAdjustment') ? hash['otherAdjustment'] : SKIP 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. Form1099Int.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, foreign_account_tax_compliance: foreign_account_tax_compliance, account_number: account_number, payer_rtn: payer_rtn, interest_income: interest_income, early_withdrawal_penalty: early_withdrawal_penalty, us_bond_interest: us_bond_interest, federal_tax_withheld: federal_tax_withheld, investment_expenses: investment_expenses, foreign_tax_paid: foreign_tax_paid, foreign_country: foreign_country, tax_exempt_interest: tax_exempt_interest, specified_pab_interest: specified_pab_interest, market_discount: market_discount, bond_premium: bond_premium, us_bond_premium: us_bond_premium, tax_exempt_bond_premium: tax_exempt_bond_premium, cusip_number: cusip_number, state_and_local: state_and_local, foreign_incomes: foreign_incomes, state_tax_exempt_income: state_tax_exempt_income, nominee_adjustment: nominee_adjustment, oid_adjustment: oid_adjustment, bond_premium_adjustment: bond_premium_adjustment, us_bond_premium_adjustment: us_bond_premium_adjustment, exempt_bond_premium_adjustment: exempt_bond_premium_adjustment, private_activity_bond_adjustment: private_activity_bond_adjustment, accrued_interest_adjustment: accrued_interest_adjustment, us_savings_bond_adjustment: us_savings_bond_adjustment, other_adjustment: other_adjustment, second_tin_notice: second_tin_notice, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
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 239 240 241 242 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 196 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['foreign_account_tax_compliance'] = 'foreignAccountTaxCompliance' @_hash['account_number'] = 'accountNumber' @_hash['payer_rtn'] = 'payerRtn' @_hash['interest_income'] = 'interestIncome' @_hash['early_withdrawal_penalty'] = 'earlyWithdrawalPenalty' @_hash['us_bond_interest'] = 'usBondInterest' @_hash['federal_tax_withheld'] = 'federalTaxWithheld' @_hash['investment_expenses'] = 'investmentExpenses' @_hash['foreign_tax_paid'] = 'foreignTaxPaid' @_hash['foreign_country'] = 'foreignCountry' @_hash['tax_exempt_interest'] = 'taxExemptInterest' @_hash['specified_pab_interest'] = 'specifiedPabInterest' @_hash['market_discount'] = 'marketDiscount' @_hash['bond_premium'] = 'bondPremium' @_hash['us_bond_premium'] = 'usBondPremium' @_hash['tax_exempt_bond_premium'] = 'taxExemptBondPremium' @_hash['cusip_number'] = 'cusipNumber' @_hash['state_and_local'] = 'stateAndLocal' @_hash['foreign_incomes'] = 'foreignIncomes' @_hash['state_tax_exempt_income'] = 'stateTaxExemptIncome' @_hash['nominee_adjustment'] = 'nomineeAdjustment' @_hash['oid_adjustment'] = 'oidAdjustment' @_hash['bond_premium_adjustment'] = 'bondPremiumAdjustment' @_hash['us_bond_premium_adjustment'] = 'usBondPremiumAdjustment' @_hash['exempt_bond_premium_adjustment'] = 'exemptBondPremiumAdjustment' @_hash['private_activity_bond_adjustment'] = 'privateActivityBondAdjustment' @_hash['accrued_interest_adjustment'] = 'accruedInterestAdjustment' @_hash['us_savings_bond_adjustment'] = 'usSavingsBondAdjustment' @_hash['other_adjustment'] = 'otherAdjustment' @_hash['second_tin_notice'] = 'secondTinNotice' @_hash end |
.nullables ⇒ Object
An array for nullable fields
293 294 295 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 293 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
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 285 286 287 288 289 290 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 245 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 foreign_account_tax_compliance account_number payer_rtn interest_income early_withdrawal_penalty us_bond_interest federal_tax_withheld investment_expenses foreign_tax_paid foreign_country tax_exempt_interest specified_pab_interest market_discount bond_premium us_bond_premium tax_exempt_bond_premium cusip_number state_and_local foreign_incomes state_tax_exempt_income nominee_adjustment oid_adjustment bond_premium_adjustment us_bond_premium_adjustment exempt_bond_premium_adjustment private_activity_bond_adjustment accrued_interest_adjustment us_savings_bond_adjustment other_adjustment second_tin_notice ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 583 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}, foreign_account_tax_compliance:"\ " #{@foreign_account_tax_compliance.inspect}, account_number: #{@account_number.inspect},"\ " payer_rtn: #{@payer_rtn.inspect}, interest_income: #{@interest_income.inspect},"\ " early_withdrawal_penalty: #{@early_withdrawal_penalty.inspect}, us_bond_interest:"\ " #{@us_bond_interest.inspect}, federal_tax_withheld: #{@federal_tax_withheld.inspect},"\ " investment_expenses: #{@investment_expenses.inspect}, foreign_tax_paid:"\ " #{@foreign_tax_paid.inspect}, foreign_country: #{@foreign_country.inspect},"\ " tax_exempt_interest: #{@tax_exempt_interest.inspect}, specified_pab_interest:"\ " #{@specified_pab_interest.inspect}, market_discount: #{@market_discount.inspect},"\ " bond_premium: #{@bond_premium.inspect}, us_bond_premium: #{@us_bond_premium.inspect},"\ " tax_exempt_bond_premium: #{@tax_exempt_bond_premium.inspect}, cusip_number:"\ " #{@cusip_number.inspect}, state_and_local: #{@state_and_local.inspect}, foreign_incomes:"\ " #{@foreign_incomes.inspect}, state_tax_exempt_income: #{@state_tax_exempt_income.inspect},"\ " nominee_adjustment: #{@nominee_adjustment.inspect}, oid_adjustment:"\ " #{@oid_adjustment.inspect}, bond_premium_adjustment: #{@bond_premium_adjustment.inspect},"\ " us_bond_premium_adjustment: #{@us_bond_premium_adjustment.inspect},"\ " exempt_bond_premium_adjustment: #{@exempt_bond_premium_adjustment.inspect},"\ " private_activity_bond_adjustment: #{@private_activity_bond_adjustment.inspect},"\ " accrued_interest_adjustment: #{@accrued_interest_adjustment.inspect},"\ " us_savings_bond_adjustment: #{@us_savings_bond_adjustment.inspect}, other_adjustment:"\ " #{@other_adjustment.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.
555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 |
# File 'lib/fdx_v660_api/models/form1099_int.rb', line 555 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}, foreign_account_tax_compliance:"\ " #{@foreign_account_tax_compliance}, account_number: #{@account_number}, payer_rtn:"\ " #{@payer_rtn}, interest_income: #{@interest_income}, early_withdrawal_penalty:"\ " #{@early_withdrawal_penalty}, us_bond_interest: #{@us_bond_interest},"\ " federal_tax_withheld: #{@federal_tax_withheld}, investment_expenses:"\ " #{@investment_expenses}, foreign_tax_paid: #{@foreign_tax_paid}, foreign_country:"\ " #{@foreign_country}, tax_exempt_interest: #{@tax_exempt_interest}, specified_pab_interest:"\ " #{@specified_pab_interest}, market_discount: #{@market_discount}, bond_premium:"\ " #{@bond_premium}, us_bond_premium: #{@us_bond_premium}, tax_exempt_bond_premium:"\ " #{@tax_exempt_bond_premium}, cusip_number: #{@cusip_number}, state_and_local:"\ " #{@state_and_local}, foreign_incomes: #{@foreign_incomes}, state_tax_exempt_income:"\ " #{@state_tax_exempt_income}, nominee_adjustment: #{@nominee_adjustment}, oid_adjustment:"\ " #{@oid_adjustment}, bond_premium_adjustment: #{@bond_premium_adjustment},"\ " us_bond_premium_adjustment: #{@us_bond_premium_adjustment},"\ " exempt_bond_premium_adjustment: #{@exempt_bond_premium_adjustment},"\ " private_activity_bond_adjustment: #{@private_activity_bond_adjustment},"\ " accrued_interest_adjustment: #{@accrued_interest_adjustment}, us_savings_bond_adjustment:"\ " #{@us_savings_bond_adjustment}, other_adjustment: #{@other_adjustment}, second_tin_notice:"\ " #{@second_tin_notice}, additional_properties: #{@additional_properties}>" end |