Class: FdxV660Api::Form1120SScheduleK1

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/fdx_v660_api/models/form1120_s_schedule_k1.rb

Overview

Shareholder's Share of Income, Deductions, Credits, etc., from Corporation (boxes A-B as issuer) to Shareholder (boxes E-F1 as recipient)

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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, final_k1: SKIP, amended_k1: SKIP, fiscal_year_begin: SKIP, fiscal_year_end: SKIP, irs_center: SKIP, corporation_beginning_shares: SKIP, corporation_ending_shares: SKIP, disregarded_entity_tin: SKIP, disregarded_entity_name: SKIP, entity_type: SKIP, percent_ownership: SKIP, beginning_shares: SKIP, ending_shares: SKIP, beginning_loans: SKIP, ending_loans: SKIP, ordinary_income: SKIP, net_rental_real_estate_income: SKIP, other_rental_income: SKIP, interest_income: SKIP, ordinary_dividends: SKIP, qualified_dividends: SKIP, royalties: SKIP, net_short_term_gain: SKIP, net_long_term_gain: SKIP, collectibles_gain: SKIP, unrecaptured1250_gain: SKIP, net1231_gain: SKIP, other_income: SKIP, section179_deduction: SKIP, other_deductions: SKIP, credits: SKIP, schedule_k3: SKIP, amt_items: SKIP, basis_items: SKIP, other_info: SKIP, multiple_at_risk_activities: SKIP, multiple_passive_activities: SKIP, k1_supplemental: SKIP, k1_statement_a: SKIP, k1_statement_c: SKIP, additional_properties: nil) ⇒ Form1120SScheduleK1

Returns a new instance of Form1120SScheduleK1.



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
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
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 358

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, final_k1: SKIP, amended_k1: SKIP,
               fiscal_year_begin: SKIP, fiscal_year_end: SKIP,
               irs_center: SKIP, corporation_beginning_shares: SKIP,
               corporation_ending_shares: SKIP,
               disregarded_entity_tin: SKIP, disregarded_entity_name: SKIP,
               entity_type: SKIP, percent_ownership: SKIP,
               beginning_shares: SKIP, ending_shares: SKIP,
               beginning_loans: SKIP, ending_loans: SKIP,
               ordinary_income: SKIP, net_rental_real_estate_income: SKIP,
               other_rental_income: SKIP, interest_income: SKIP,
               ordinary_dividends: SKIP, qualified_dividends: SKIP,
               royalties: SKIP, net_short_term_gain: SKIP,
               net_long_term_gain: SKIP, collectibles_gain: SKIP,
               unrecaptured1250_gain: SKIP, net1231_gain: SKIP,
               other_income: SKIP, section179_deduction: SKIP,
               other_deductions: SKIP, credits: SKIP, schedule_k3: SKIP,
               amt_items: SKIP, basis_items: SKIP, other_info: SKIP,
               multiple_at_risk_activities: SKIP,
               multiple_passive_activities: SKIP, k1_supplemental: SKIP,
               k1_statement_a: SKIP, k1_statement_c: 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 =  unless  == 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
  @final_k1 = final_k1 unless final_k1 == SKIP
  @amended_k1 = amended_k1 unless amended_k1 == SKIP
  @fiscal_year_begin = fiscal_year_begin unless fiscal_year_begin == SKIP
  @fiscal_year_end = fiscal_year_end unless fiscal_year_end == SKIP
  @irs_center = irs_center unless irs_center == SKIP
  unless corporation_beginning_shares == SKIP
    @corporation_beginning_shares =
      corporation_beginning_shares
  end
  unless corporation_ending_shares == SKIP
    @corporation_ending_shares =
      corporation_ending_shares
  end
  @disregarded_entity_tin = disregarded_entity_tin unless disregarded_entity_tin == SKIP
  @disregarded_entity_name = disregarded_entity_name unless disregarded_entity_name == SKIP
  @entity_type = entity_type unless entity_type == SKIP
  @percent_ownership = percent_ownership unless percent_ownership == SKIP
  @beginning_shares = beginning_shares unless beginning_shares == SKIP
  @ending_shares = ending_shares unless ending_shares == SKIP
  @beginning_loans = beginning_loans unless beginning_loans == SKIP
  @ending_loans = ending_loans unless ending_loans == SKIP
  @ordinary_income = ordinary_income unless ordinary_income == SKIP
  unless net_rental_real_estate_income == SKIP
    @net_rental_real_estate_income =
      net_rental_real_estate_income
  end
  @other_rental_income = other_rental_income unless other_rental_income == SKIP
  @interest_income = interest_income unless interest_income == SKIP
  @ordinary_dividends = ordinary_dividends unless ordinary_dividends == SKIP
  @qualified_dividends = qualified_dividends unless qualified_dividends == SKIP
  @royalties = royalties unless royalties == SKIP
  @net_short_term_gain = net_short_term_gain unless net_short_term_gain == SKIP
  @net_long_term_gain = net_long_term_gain unless net_long_term_gain == SKIP
  @collectibles_gain = collectibles_gain unless collectibles_gain == SKIP
  @unrecaptured1250_gain = unrecaptured1250_gain unless unrecaptured1250_gain == SKIP
  @net1231_gain = net1231_gain unless net1231_gain == SKIP
  @other_income = other_income unless other_income == SKIP
  @section179_deduction = section179_deduction unless section179_deduction == SKIP
  @other_deductions = other_deductions unless other_deductions == SKIP
  @credits = credits unless credits == SKIP
  @schedule_k3 = schedule_k3 unless schedule_k3 == SKIP
  @amt_items = amt_items unless amt_items == SKIP
  @basis_items = basis_items unless basis_items == SKIP
  @other_info = other_info unless other_info == SKIP
  unless multiple_at_risk_activities == SKIP
    @multiple_at_risk_activities =
      multiple_at_risk_activities
  end
  unless multiple_passive_activities == SKIP
    @multiple_passive_activities =
      multiple_passive_activities
  end
  @k1_supplemental = k1_supplemental unless k1_supplemental == SKIP
  @k1_statement_a = k1_statement_a unless k1_statement_a == SKIP
  @k1_statement_c = k1_statement_c unless k1_statement_c == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#account_idString

Long-term persistent identity of the source account. Not the account number

Returns:

  • (String)


24
25
26
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 24

def 
  @account_id
end

#additional_informationString

Additional explanation text or content about this tax form

Returns:

  • (String)


38
39
40
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 38

def additional_information
  @additional_information
end

#amended_k1TrueClass | FalseClass

Amended K-1

Returns:

  • (TrueClass | FalseClass)


80
81
82
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 80

def amended_k1
  @amended_k1
end

#amt_itemsArray[CodeAndAmount]

Box 15, Alternative minimum tax (AMT) items

Returns:



204
205
206
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 204

def amt_items
  @amt_items
end

#attributesArray[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.

Returns:



64
65
66
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 64

def attributes
  @attributes
end

#basis_itemsArray[CodeAndAmount]

Box 16, Items affecting shareholder basis

Returns:



208
209
210
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 208

def basis_items
  @basis_items
end

#beginning_loansFloat

Box I, Loans from shareholder, Beginning of tax year

Returns:

  • (Float)


128
129
130
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 128

def beginning_loans
  @beginning_loans
end

#beginning_sharesFloat

Box H, Shareholder's number of shares, Beginning of tax year

Returns:

  • (Float)


120
121
122
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 120

def beginning_shares
  @beginning_shares
end

#collectibles_gainFloat

Box 8b, Collectibles (28%) gain (loss)

Returns:

  • (Float)


172
173
174
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 172

def collectibles_gain
  @collectibles_gain
end

#corporation_beginning_sharesFloat

Box D, Corporation's total number of shares, Beginning of tax year

Returns:

  • (Float)


96
97
98
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 96

def corporation_beginning_shares
  @corporation_beginning_shares
end

#corporation_ending_sharesFloat

Box D, Corporation's total number of shares, End of tax year

Returns:

  • (Float)


100
101
102
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 100

def corporation_ending_shares
  @corporation_ending_shares
end

#correctedTrueClass | FalseClass

True to indicate this is a corrected tax form

Returns:

  • (TrueClass | FalseClass)


19
20
21
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 19

def corrected
  @corrected
end

#creditsArray[CodeAndAmount]

Box 13, Credits

Returns:



196
197
198
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 196

def credits
  @credits
end

#disregarded_entity_nameString

Box F2, Disregarded entity shareholder's Name, if applicable

Returns:

  • (String)


108
109
110
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 108

def disregarded_entity_name
  @disregarded_entity_name
end

#disregarded_entity_tinString

Box F2, Disregarded entity shareholder's TIN, if applicable

Returns:

  • (String)


104
105
106
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 104

def disregarded_entity_tin
  @disregarded_entity_tin
end

#ending_loansFloat

Box I, Loans from shareholder, Ending of tax year

Returns:

  • (Float)


132
133
134
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 132

def ending_loans
  @ending_loans
end

#ending_sharesFloat

Box H, Shareholder's number of shares, End of tax year

Returns:

  • (Float)


124
125
126
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 124

def ending_shares
  @ending_shares
end

#entity_typeString

Box F3, What type of entity is this shareholder?

Returns:

  • (String)


112
113
114
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 112

def entity_type
  @entity_type
end

#errorError2

Present if an error was encountered while retrieving this form

Returns:



68
69
70
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 68

def error
  @error
end

#final_k1TrueClass | FalseClass

Final K-1

Returns:

  • (TrueClass | FalseClass)


76
77
78
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 76

def final_k1
  @final_k1
end

#fiscal_year_beginDate

Fiscal year begin date

Returns:

  • (Date)


84
85
86
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 84

def fiscal_year_begin
  @fiscal_year_begin
end

#fiscal_year_endDate

Fiscal year end date

Returns:

  • (Date)


88
89
90
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 88

def fiscal_year_end
  @fiscal_year_end
end

#interest_incomeFloat

Box 4, Interest income

Returns:

  • (Float)


148
149
150
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 148

def interest_income
  @interest_income
end

#irs_centerString

Box C, IRS Center where corporation filed return

Returns:

  • (String)


92
93
94
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 92

def irs_center
  @irs_center
end

#issuerTaxParty8

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.

Returns:



48
49
50
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 48

def issuer
  @issuer
end

#k1_statement_aK1StatementA2

Form 1120-S Schedule K-1 Statement A, Qualified Business Income (QBI) Pass-Through Entity Reporting

Returns:



229
230
231
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 229

def k1_statement_a
  @k1_statement_a
end

#k1_statement_cK1StatementC2

Form 1120-S Schedule K-1 Statement C, Qualified Business Income (QBI) Pass-Through Entity Reporting, Patrons of Specified Agricultural and Horticultural Coooperatives

Returns:



235
236
237
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 235

def k1_statement_c
  @k1_statement_c
end

#k1_supplementalK1Supplemental2

Supplemental Information for Form 1120-S Schedule K-1 (S Corporation)

Returns:



224
225
226
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 224

def k1_supplemental
  @k1_supplemental
end

Links to retrieve this form as data or image, or to invoke other APIs

Returns:



72
73
74
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 72

def links
  @links
end

#multiple_at_risk_activitiesTrueClass | FalseClass

Box 18, More than one activity for at-risk purposes

Returns:

  • (TrueClass | FalseClass)


216
217
218
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 216

def multiple_at_risk_activities
  @multiple_at_risk_activities
end

#multiple_passive_activitiesTrueClass | FalseClass

Box 19, More than one activity for passive activity purposes

Returns:

  • (TrueClass | FalseClass)


220
221
222
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 220

def multiple_passive_activities
  @multiple_passive_activities
end

#net1231_gainFloat

Box 9, Net section 1231 gain (loss)

Returns:

  • (Float)


180
181
182
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 180

def net1231_gain
  @net1231_gain
end

#net_long_term_gainFloat

Box 8a, Net long-term capital gain (loss)

Returns:

  • (Float)


168
169
170
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 168

def net_long_term_gain
  @net_long_term_gain
end

#net_rental_real_estate_incomeFloat

Box 2, Net rental real estate income (loss)

Returns:

  • (Float)


140
141
142
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 140

def net_rental_real_estate_income
  @net_rental_real_estate_income
end

#net_short_term_gainFloat

Box 7, Net short-term capital gain (loss)

Returns:

  • (Float)


164
165
166
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 164

def net_short_term_gain
  @net_short_term_gain
end

#ordinary_dividendsFloat

Box 5a, Ordinary dividends

Returns:

  • (Float)


152
153
154
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 152

def ordinary_dividends
  @ordinary_dividends
end

#ordinary_incomeFloat

Box 1, Ordinary business income (loss)

Returns:

  • (Float)


136
137
138
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 136

def ordinary_income
  @ordinary_income
end

#other_deductionsArray[CodeAndAmount]

Box 12, Other deductions

Returns:



192
193
194
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 192

def other_deductions
  @other_deductions
end

#other_incomeArray[CodeAndAmount]

Box 10, Other income (loss)

Returns:



184
185
186
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 184

def other_income
  @other_income
end

#other_infoArray[CodeAndAmount]

Box 17, Other information

Returns:



212
213
214
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 212

def other_info
  @other_info
end

#other_rental_incomeFloat

Box 3, Other net rental income (loss)

Returns:

  • (Float)


144
145
146
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 144

def other_rental_income
  @other_rental_income
end

#percent_ownershipFloat

Box G, Current year allocation percentage

Returns:

  • (Float)


116
117
118
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 116

def percent_ownership
  @percent_ownership
end

#qualified_dividendsFloat

Box 5b, Qualified dividends

Returns:

  • (Float)


156
157
158
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 156

def qualified_dividends
  @qualified_dividends
end

#recipientTaxParty1

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.

Returns:



54
55
56
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 54

def recipient
  @recipient
end

#royaltiesFloat

Box 6, Royalties

Returns:

  • (Float)


160
161
162
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 160

def royalties
  @royalties
end

#schedule_k3TrueClass | FalseClass

Box 14, Schedule K-3 is attached

Returns:

  • (TrueClass | FalseClass)


200
201
202
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 200

def schedule_k3
  @schedule_k3
end

#section179_deductionFloat

Box 11, Section 179 deduction

Returns:

  • (Float)


188
189
190
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 188

def section179_deduction
  @section179_deduction
end

#tax_form_dateDate

Date of production or delivery of the tax form

Returns:

  • (Date)


34
35
36
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 34

def tax_form_date
  @tax_form_date
end

#tax_form_idString

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.

Returns:

  • (String)


30
31
32
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 30

def tax_form_id
  @tax_form_id
end

#tax_form_typeTypeFormType1

Enumerated name of the tax form entity e.g. "TaxW2"

Returns:



42
43
44
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 42

def tax_form_type
  @tax_form_type
end

#tax_yearInteger

Year for which taxes are being paid

Returns:

  • (Integer)


15
16
17
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 15

def tax_year
  @tax_year
end

#unrecaptured1250_gainFloat

Box 8c, Unrecaptured section 1250 gain

Returns:

  • (Float)


176
177
178
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 176

def unrecaptured1250_gain
  @unrecaptured1250_gain
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
560
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
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
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 457

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
   = 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')
  final_k1 = hash.key?('finalK1') ? hash['finalK1'] : SKIP
  amended_k1 = hash.key?('amendedK1') ? hash['amendedK1'] : SKIP
  fiscal_year_begin =
    hash.key?('fiscalYearBegin') ? hash['fiscalYearBegin'] : SKIP
  fiscal_year_end =
    hash.key?('fiscalYearEnd') ? hash['fiscalYearEnd'] : SKIP
  irs_center = hash.key?('irsCenter') ? hash['irsCenter'] : SKIP
  corporation_beginning_shares =
    hash.key?('corporationBeginningShares') ? hash['corporationBeginningShares'] : SKIP
  corporation_ending_shares =
    hash.key?('corporationEndingShares') ? hash['corporationEndingShares'] : SKIP
  disregarded_entity_tin =
    hash.key?('disregardedEntityTin') ? hash['disregardedEntityTin'] : SKIP
  disregarded_entity_name =
    hash.key?('disregardedEntityName') ? hash['disregardedEntityName'] : SKIP
  entity_type = hash.key?('entityType') ? hash['entityType'] : SKIP
  percent_ownership =
    hash.key?('percentOwnership') ? hash['percentOwnership'] : SKIP
  beginning_shares =
    hash.key?('beginningShares') ? hash['beginningShares'] : SKIP
  ending_shares = hash.key?('endingShares') ? hash['endingShares'] : SKIP
  beginning_loans =
    hash.key?('beginningLoans') ? hash['beginningLoans'] : SKIP
  ending_loans = hash.key?('endingLoans') ? hash['endingLoans'] : SKIP
  ordinary_income =
    hash.key?('ordinaryIncome') ? hash['ordinaryIncome'] : SKIP
  net_rental_real_estate_income =
    hash.key?('netRentalRealEstateIncome') ? hash['netRentalRealEstateIncome'] : SKIP
  other_rental_income =
    hash.key?('otherRentalIncome') ? hash['otherRentalIncome'] : SKIP
  interest_income =
    hash.key?('interestIncome') ? hash['interestIncome'] : SKIP
  ordinary_dividends =
    hash.key?('ordinaryDividends') ? hash['ordinaryDividends'] : SKIP
  qualified_dividends =
    hash.key?('qualifiedDividends') ? hash['qualifiedDividends'] : SKIP
  royalties = hash.key?('royalties') ? hash['royalties'] : SKIP
  net_short_term_gain =
    hash.key?('netShortTermGain') ? hash['netShortTermGain'] : SKIP
  net_long_term_gain =
    hash.key?('netLongTermGain') ? hash['netLongTermGain'] : SKIP
  collectibles_gain =
    hash.key?('collectiblesGain') ? hash['collectiblesGain'] : SKIP
  unrecaptured1250_gain =
    hash.key?('unrecaptured1250Gain') ? hash['unrecaptured1250Gain'] : SKIP
  net1231_gain = hash.key?('net1231Gain') ? hash['net1231Gain'] : SKIP
  # Parameter is an array, so we need to iterate through it
  other_income = nil
  unless hash['otherIncome'].nil?
    other_income = []
    hash['otherIncome'].each do |structure|
      other_income << (CodeAndAmount.from_hash(structure) if structure)
    end
  end

  other_income = SKIP unless hash.key?('otherIncome')
  section179_deduction =
    hash.key?('section179Deduction') ? hash['section179Deduction'] : SKIP
  # Parameter is an array, so we need to iterate through it
  other_deductions = nil
  unless hash['otherDeductions'].nil?
    other_deductions = []
    hash['otherDeductions'].each do |structure|
      other_deductions << (CodeAndAmount.from_hash(structure) if structure)
    end
  end

  other_deductions = SKIP unless hash.key?('otherDeductions')
  # Parameter is an array, so we need to iterate through it
  credits = nil
  unless hash['credits'].nil?
    credits = []
    hash['credits'].each do |structure|
      credits << (CodeAndAmount.from_hash(structure) if structure)
    end
  end

  credits = SKIP unless hash.key?('credits')
  schedule_k3 = hash.key?('scheduleK3') ? hash['scheduleK3'] : SKIP
  # Parameter is an array, so we need to iterate through it
  amt_items = nil
  unless hash['amtItems'].nil?
    amt_items = []
    hash['amtItems'].each do |structure|
      amt_items << (CodeAndAmount.from_hash(structure) if structure)
    end
  end

  amt_items = SKIP unless hash.key?('amtItems')
  # Parameter is an array, so we need to iterate through it
  basis_items = nil
  unless hash['basisItems'].nil?
    basis_items = []
    hash['basisItems'].each do |structure|
      basis_items << (CodeAndAmount.from_hash(structure) if structure)
    end
  end

  basis_items = SKIP unless hash.key?('basisItems')
  # Parameter is an array, so we need to iterate through it
  other_info = nil
  unless hash['otherInfo'].nil?
    other_info = []
    hash['otherInfo'].each do |structure|
      other_info << (CodeAndAmount.from_hash(structure) if structure)
    end
  end

  other_info = SKIP unless hash.key?('otherInfo')
  multiple_at_risk_activities =
    hash.key?('multipleAtRiskActivities') ? hash['multipleAtRiskActivities'] : SKIP
  multiple_passive_activities =
    hash.key?('multiplePassiveActivities') ? hash['multiplePassiveActivities'] : SKIP
  k1_supplemental = K1Supplemental2.from_hash(hash['k1Supplemental']) if
    hash['k1Supplemental']
  k1_statement_a = K1StatementA2.from_hash(hash['k1StatementA']) if hash['k1StatementA']
  k1_statement_c = K1StatementC2.from_hash(hash['k1StatementC']) if hash['k1StatementC']

  # 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.
  Form1120SScheduleK1.new(tax_year: tax_year,
                          corrected: corrected,
                          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,
                          final_k1: final_k1,
                          amended_k1: amended_k1,
                          fiscal_year_begin: fiscal_year_begin,
                          fiscal_year_end: fiscal_year_end,
                          irs_center: irs_center,
                          corporation_beginning_shares: corporation_beginning_shares,
                          corporation_ending_shares: corporation_ending_shares,
                          disregarded_entity_tin: disregarded_entity_tin,
                          disregarded_entity_name: disregarded_entity_name,
                          entity_type: entity_type,
                          percent_ownership: percent_ownership,
                          beginning_shares: beginning_shares,
                          ending_shares: ending_shares,
                          beginning_loans: beginning_loans,
                          ending_loans: ending_loans,
                          ordinary_income: ordinary_income,
                          net_rental_real_estate_income: net_rental_real_estate_income,
                          other_rental_income: other_rental_income,
                          interest_income: interest_income,
                          ordinary_dividends: ordinary_dividends,
                          qualified_dividends: qualified_dividends,
                          royalties: royalties,
                          net_short_term_gain: net_short_term_gain,
                          net_long_term_gain: net_long_term_gain,
                          collectibles_gain: collectibles_gain,
                          unrecaptured1250_gain: unrecaptured1250_gain,
                          net1231_gain: net1231_gain,
                          other_income: other_income,
                          section179_deduction: section179_deduction,
                          other_deductions: other_deductions,
                          credits: credits,
                          schedule_k3: schedule_k3,
                          amt_items: amt_items,
                          basis_items: basis_items,
                          other_info: other_info,
                          multiple_at_risk_activities: multiple_at_risk_activities,
                          multiple_passive_activities: multiple_passive_activities,
                          k1_supplemental: k1_supplemental,
                          k1_statement_a: k1_statement_a,
                          k1_statement_c: k1_statement_c,
                          additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
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
291
292
293
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 238

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['final_k1'] = 'finalK1'
  @_hash['amended_k1'] = 'amendedK1'
  @_hash['fiscal_year_begin'] = 'fiscalYearBegin'
  @_hash['fiscal_year_end'] = 'fiscalYearEnd'
  @_hash['irs_center'] = 'irsCenter'
  @_hash['corporation_beginning_shares'] = 'corporationBeginningShares'
  @_hash['corporation_ending_shares'] = 'corporationEndingShares'
  @_hash['disregarded_entity_tin'] = 'disregardedEntityTin'
  @_hash['disregarded_entity_name'] = 'disregardedEntityName'
  @_hash['entity_type'] = 'entityType'
  @_hash['percent_ownership'] = 'percentOwnership'
  @_hash['beginning_shares'] = 'beginningShares'
  @_hash['ending_shares'] = 'endingShares'
  @_hash['beginning_loans'] = 'beginningLoans'
  @_hash['ending_loans'] = 'endingLoans'
  @_hash['ordinary_income'] = 'ordinaryIncome'
  @_hash['net_rental_real_estate_income'] = 'netRentalRealEstateIncome'
  @_hash['other_rental_income'] = 'otherRentalIncome'
  @_hash['interest_income'] = 'interestIncome'
  @_hash['ordinary_dividends'] = 'ordinaryDividends'
  @_hash['qualified_dividends'] = 'qualifiedDividends'
  @_hash['royalties'] = 'royalties'
  @_hash['net_short_term_gain'] = 'netShortTermGain'
  @_hash['net_long_term_gain'] = 'netLongTermGain'
  @_hash['collectibles_gain'] = 'collectiblesGain'
  @_hash['unrecaptured1250_gain'] = 'unrecaptured1250Gain'
  @_hash['net1231_gain'] = 'net1231Gain'
  @_hash['other_income'] = 'otherIncome'
  @_hash['section179_deduction'] = 'section179Deduction'
  @_hash['other_deductions'] = 'otherDeductions'
  @_hash['credits'] = 'credits'
  @_hash['schedule_k3'] = 'scheduleK3'
  @_hash['amt_items'] = 'amtItems'
  @_hash['basis_items'] = 'basisItems'
  @_hash['other_info'] = 'otherInfo'
  @_hash['multiple_at_risk_activities'] = 'multipleAtRiskActivities'
  @_hash['multiple_passive_activities'] = 'multiplePassiveActivities'
  @_hash['k1_supplemental'] = 'k1Supplemental'
  @_hash['k1_statement_a'] = 'k1StatementA'
  @_hash['k1_statement_c'] = 'k1StatementC'
  @_hash
end

.nullablesObject

An array for nullable fields



354
355
356
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 354

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 296

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
    final_k1
    amended_k1
    fiscal_year_begin
    fiscal_year_end
    irs_center
    corporation_beginning_shares
    corporation_ending_shares
    disregarded_entity_tin
    disregarded_entity_name
    entity_type
    percent_ownership
    beginning_shares
    ending_shares
    beginning_loans
    ending_loans
    ordinary_income
    net_rental_real_estate_income
    other_rental_income
    interest_income
    ordinary_dividends
    qualified_dividends
    royalties
    net_short_term_gain
    net_long_term_gain
    collectibles_gain
    unrecaptured1250_gain
    net1231_gain
    other_income
    section179_deduction
    other_deductions
    credits
    schedule_k3
    amt_items
    basis_items
    other_info
    multiple_at_risk_activities
    multiple_passive_activities
    k1_supplemental
    k1_statement_a
    k1_statement_c
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 705

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}, final_k1: #{@final_k1.inspect}, amended_k1:"\
  " #{@amended_k1.inspect}, fiscal_year_begin: #{@fiscal_year_begin.inspect}, fiscal_year_end:"\
  " #{@fiscal_year_end.inspect}, irs_center: #{@irs_center.inspect},"\
  " corporation_beginning_shares: #{@corporation_beginning_shares.inspect},"\
  " corporation_ending_shares: #{@corporation_ending_shares.inspect}, disregarded_entity_tin:"\
  " #{@disregarded_entity_tin.inspect}, disregarded_entity_name:"\
  " #{@disregarded_entity_name.inspect}, entity_type: #{@entity_type.inspect},"\
  " percent_ownership: #{@percent_ownership.inspect}, beginning_shares:"\
  " #{@beginning_shares.inspect}, ending_shares: #{@ending_shares.inspect}, beginning_loans:"\
  " #{@beginning_loans.inspect}, ending_loans: #{@ending_loans.inspect}, ordinary_income:"\
  " #{@ordinary_income.inspect}, net_rental_real_estate_income:"\
  " #{@net_rental_real_estate_income.inspect}, other_rental_income:"\
  " #{@other_rental_income.inspect}, interest_income: #{@interest_income.inspect},"\
  " ordinary_dividends: #{@ordinary_dividends.inspect}, qualified_dividends:"\
  " #{@qualified_dividends.inspect}, royalties: #{@royalties.inspect}, net_short_term_gain:"\
  " #{@net_short_term_gain.inspect}, net_long_term_gain: #{@net_long_term_gain.inspect},"\
  " collectibles_gain: #{@collectibles_gain.inspect}, unrecaptured1250_gain:"\
  " #{@unrecaptured1250_gain.inspect}, net1231_gain: #{@net1231_gain.inspect}, other_income:"\
  " #{@other_income.inspect}, section179_deduction: #{@section179_deduction.inspect},"\
  " other_deductions: #{@other_deductions.inspect}, credits: #{@credits.inspect}, schedule_k3:"\
  " #{@schedule_k3.inspect}, amt_items: #{@amt_items.inspect}, basis_items:"\
  " #{@basis_items.inspect}, other_info: #{@other_info.inspect}, multiple_at_risk_activities:"\
  " #{@multiple_at_risk_activities.inspect}, multiple_passive_activities:"\
  " #{@multiple_passive_activities.inspect}, k1_supplemental: #{@k1_supplemental.inspect},"\
  " k1_statement_a: #{@k1_statement_a.inspect}, k1_statement_c: #{@k1_statement_c.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
# File 'lib/fdx_v660_api/models/form1120_s_schedule_k1.rb', line 674

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}, final_k1: #{@final_k1}, amended_k1: #{@amended_k1},"\
  " fiscal_year_begin: #{@fiscal_year_begin}, fiscal_year_end: #{@fiscal_year_end},"\
  " irs_center: #{@irs_center}, corporation_beginning_shares:"\
  " #{@corporation_beginning_shares}, corporation_ending_shares:"\
  " #{@corporation_ending_shares}, disregarded_entity_tin: #{@disregarded_entity_tin},"\
  " disregarded_entity_name: #{@disregarded_entity_name}, entity_type: #{@entity_type},"\
  " percent_ownership: #{@percent_ownership}, beginning_shares: #{@beginning_shares},"\
  " ending_shares: #{@ending_shares}, beginning_loans: #{@beginning_loans}, ending_loans:"\
  " #{@ending_loans}, ordinary_income: #{@ordinary_income}, net_rental_real_estate_income:"\
  " #{@net_rental_real_estate_income}, other_rental_income: #{@other_rental_income},"\
  " interest_income: #{@interest_income}, ordinary_dividends: #{@ordinary_dividends},"\
  " qualified_dividends: #{@qualified_dividends}, royalties: #{@royalties},"\
  " net_short_term_gain: #{@net_short_term_gain}, net_long_term_gain: #{@net_long_term_gain},"\
  " collectibles_gain: #{@collectibles_gain}, unrecaptured1250_gain:"\
  " #{@unrecaptured1250_gain}, net1231_gain: #{@net1231_gain}, other_income: #{@other_income},"\
  " section179_deduction: #{@section179_deduction}, other_deductions: #{@other_deductions},"\
  " credits: #{@credits}, schedule_k3: #{@schedule_k3}, amt_items: #{@amt_items}, basis_items:"\
  " #{@basis_items}, other_info: #{@other_info}, multiple_at_risk_activities:"\
  " #{@multiple_at_risk_activities}, multiple_passive_activities:"\
  " #{@multiple_passive_activities}, k1_supplemental: #{@k1_supplemental}, k1_statement_a:"\
  " #{@k1_statement_a}, k1_statement_c: #{@k1_statement_c}, additional_properties:"\
  " #{@additional_properties}>"
end