Class: ThePlaidApi::Credit1099

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/the_plaid_api/models/credit1099.rb

Overview

An object representing an end user’s 1099 tax form

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(document_id:, document_metadata: SKIP, form_1099_type: SKIP, recipient: SKIP, payer: SKIP, filer: SKIP, tax_year: SKIP, rents: SKIP, royalties: SKIP, other_income: SKIP, federal_income_tax_withheld: SKIP, fishing_boat_proceeds: SKIP, medical_and_healthcare_payments: SKIP, nonemployee_compensation: SKIP, substitute_payments_in_lieu_of_dividends_or_interest: SKIP, payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer: SKIP, crop_insurance_proceeds: SKIP, excess_golden_parachute_payments: SKIP, gross_proceeds_paid_to_an_attorney: SKIP, section_409a_deferrals: SKIP, section_409a_income: SKIP, state_tax_withheld: SKIP, state_tax_withheld_lower: SKIP, payer_state_number: SKIP, payer_state_number_lower: SKIP, state_income: SKIP, state_income_lower: SKIP, transactions_reported: SKIP, pse_name: SKIP, pse_telephone_number: SKIP, gross_amount: SKIP, card_not_present_transaction: SKIP, merchant_category_code: SKIP, number_of_payment_transactions: SKIP, january_amount: SKIP, february_amount: SKIP, march_amount: SKIP, april_amount: SKIP, may_amount: SKIP, june_amount: SKIP, july_amount: SKIP, august_amount: SKIP, september_amount: SKIP, october_amount: SKIP, november_amount: SKIP, december_amount: SKIP, primary_state: SKIP, secondary_state: SKIP, primary_state_id: SKIP, secondary_state_id: SKIP, primary_state_income_tax: SKIP, secondary_state_income_tax: SKIP, additional_properties: nil) ⇒ Credit1099

Returns a new instance of Credit1099.



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
# File 'lib/the_plaid_api/models/credit1099.rb', line 396

def initialize(
  document_id:, document_metadata: SKIP, form_1099_type: SKIP,
  recipient: SKIP, payer: SKIP, filer: SKIP, tax_year: SKIP, rents: SKIP,
  royalties: SKIP, other_income: SKIP, federal_income_tax_withheld: SKIP,
  fishing_boat_proceeds: SKIP, medical_and_healthcare_payments: SKIP,
  nonemployee_compensation: SKIP,
  substitute_payments_in_lieu_of_dividends_or_interest: SKIP,
  payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer: SKIP,
  crop_insurance_proceeds: SKIP, excess_golden_parachute_payments: SKIP,
  gross_proceeds_paid_to_an_attorney: SKIP, section_409a_deferrals: SKIP,
  section_409a_income: SKIP, state_tax_withheld: SKIP,
  state_tax_withheld_lower: SKIP, payer_state_number: SKIP,
  payer_state_number_lower: SKIP, state_income: SKIP,
  state_income_lower: SKIP, transactions_reported: SKIP, pse_name: SKIP,
  pse_telephone_number: SKIP, gross_amount: SKIP,
  card_not_present_transaction: SKIP, merchant_category_code: SKIP,
  number_of_payment_transactions: SKIP, january_amount: SKIP,
  february_amount: SKIP, march_amount: SKIP, april_amount: SKIP,
  may_amount: SKIP, june_amount: SKIP, july_amount: SKIP,
  august_amount: SKIP, september_amount: SKIP, october_amount: SKIP,
  november_amount: SKIP, december_amount: SKIP, primary_state: SKIP,
  secondary_state: SKIP, primary_state_id: SKIP, secondary_state_id: SKIP,
  primary_state_income_tax: SKIP, secondary_state_income_tax: SKIP,
  additional_properties: nil
)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @document_id = document_id
  @document_metadata =  unless  == SKIP
  @form_1099_type = form_1099_type unless form_1099_type == SKIP
  @recipient = recipient unless recipient == SKIP
  @payer = payer unless payer == SKIP
  @filer = filer unless filer == SKIP
  @tax_year = tax_year unless tax_year == SKIP
  @rents = rents unless rents == SKIP
  @royalties = royalties unless royalties == SKIP
  @other_income = other_income unless other_income == SKIP
  unless federal_income_tax_withheld == SKIP
    @federal_income_tax_withheld =
      federal_income_tax_withheld
  end
  @fishing_boat_proceeds = fishing_boat_proceeds unless fishing_boat_proceeds == SKIP
  unless medical_and_healthcare_payments == SKIP
    @medical_and_healthcare_payments =
      medical_and_healthcare_payments
  end
  @nonemployee_compensation = nonemployee_compensation unless nonemployee_compensation == SKIP
  unless substitute_payments_in_lieu_of_dividends_or_interest == SKIP
    @substitute_payments_in_lieu_of_dividends_or_interest =
      substitute_payments_in_lieu_of_dividends_or_interest
  end
  unless payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer == SKIP
    @payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer =
      payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer
  end
  @crop_insurance_proceeds = crop_insurance_proceeds unless crop_insurance_proceeds == SKIP
  unless excess_golden_parachute_payments == SKIP
    @excess_golden_parachute_payments =
      excess_golden_parachute_payments
  end
  unless gross_proceeds_paid_to_an_attorney == SKIP
    @gross_proceeds_paid_to_an_attorney =
      gross_proceeds_paid_to_an_attorney
  end
  @section_409a_deferrals = section_409a_deferrals unless section_409a_deferrals == SKIP
  @section_409a_income = section_409a_income unless section_409a_income == SKIP
  @state_tax_withheld = state_tax_withheld unless state_tax_withheld == SKIP
  @state_tax_withheld_lower = state_tax_withheld_lower unless state_tax_withheld_lower == SKIP
  @payer_state_number = payer_state_number unless payer_state_number == SKIP
  @payer_state_number_lower = payer_state_number_lower unless payer_state_number_lower == SKIP
  @state_income = state_income unless state_income == SKIP
  @state_income_lower = state_income_lower unless state_income_lower == SKIP
  @transactions_reported = transactions_reported unless transactions_reported == SKIP
  @pse_name = pse_name unless pse_name == SKIP
  @pse_telephone_number = pse_telephone_number unless pse_telephone_number == SKIP
  @gross_amount = gross_amount unless gross_amount == SKIP
  unless card_not_present_transaction == SKIP
    @card_not_present_transaction =
      card_not_present_transaction
  end
  @merchant_category_code = merchant_category_code unless merchant_category_code == SKIP
  unless number_of_payment_transactions == SKIP
    @number_of_payment_transactions =
      number_of_payment_transactions
  end
  @january_amount = january_amount unless january_amount == SKIP
  @february_amount = february_amount unless february_amount == SKIP
  @march_amount = march_amount unless march_amount == SKIP
  @april_amount = april_amount unless april_amount == SKIP
  @may_amount = may_amount unless may_amount == SKIP
  @june_amount = june_amount unless june_amount == SKIP
  @july_amount = july_amount unless july_amount == SKIP
  @august_amount = august_amount unless august_amount == SKIP
  @september_amount = september_amount unless september_amount == SKIP
  @october_amount = october_amount unless october_amount == SKIP
  @november_amount = november_amount unless november_amount == SKIP
  @december_amount = december_amount unless december_amount == SKIP
  @primary_state = primary_state unless primary_state == SKIP
  @secondary_state = secondary_state unless secondary_state == SKIP
  @primary_state_id = primary_state_id unless primary_state_id == SKIP
  @secondary_state_id = secondary_state_id unless secondary_state_id == SKIP
  @primary_state_income_tax = primary_state_income_tax unless primary_state_income_tax == SKIP
  unless secondary_state_income_tax == SKIP
    @secondary_state_income_tax =
      secondary_state_income_tax
  end
  @additional_properties = additional_properties
end

Instance Attribute Details

#april_amountFloat

Amount reported for April.

Returns:

  • (Float)


164
165
166
# File 'lib/the_plaid_api/models/credit1099.rb', line 164

def april_amount
  @april_amount
end

#august_amountFloat

Amount reported for August.

Returns:

  • (Float)


180
181
182
# File 'lib/the_plaid_api/models/credit1099.rb', line 180

def august_amount
  @august_amount
end

#card_not_present_transactionFloat

Amount in card not present transactions.

Returns:

  • (Float)


140
141
142
# File 'lib/the_plaid_api/models/credit1099.rb', line 140

def card_not_present_transaction
  @card_not_present_transaction
end

#crop_insurance_proceedsFloat

Amount of crop insurance proceeds.

Returns:

  • (Float)


79
80
81
# File 'lib/the_plaid_api/models/credit1099.rb', line 79

def crop_insurance_proceeds
  @crop_insurance_proceeds
end

#december_amountFloat

Amount reported for December.

Returns:

  • (Float)


196
197
198
# File 'lib/the_plaid_api/models/credit1099.rb', line 196

def december_amount
  @december_amount
end

#document_idString

An identifier of the document referenced by the document metadata.

Returns:

  • (String)


14
15
16
# File 'lib/the_plaid_api/models/credit1099.rb', line 14

def document_id
  @document_id
end

#document_metadataCreditDocumentMetadata

Object representing metadata pertaining to the document.



18
19
20
# File 'lib/the_plaid_api/models/credit1099.rb', line 18

def 
  @document_metadata
end

#excess_golden_parachute_paymentsFloat

Amount of golden parachute payments made by payer.

Returns:

  • (Float)


83
84
85
# File 'lib/the_plaid_api/models/credit1099.rb', line 83

def excess_golden_parachute_payments
  @excess_golden_parachute_payments
end

#february_amountFloat

Amount reported for February.

Returns:

  • (Float)


156
157
158
# File 'lib/the_plaid_api/models/credit1099.rb', line 156

def february_amount
  @february_amount
end

#federal_income_tax_withheldFloat

Amount of federal income tax withheld from payer.

Returns:

  • (Float)


55
56
57
# File 'lib/the_plaid_api/models/credit1099.rb', line 55

def federal_income_tax_withheld
  @federal_income_tax_withheld
end

#filerCredit1099Filer

An object representing a filer used by 1099-K tax documents.

Returns:



35
36
37
# File 'lib/the_plaid_api/models/credit1099.rb', line 35

def filer
  @filer
end

#fishing_boat_proceedsFloat

Amount of fishing boat proceeds from payer.

Returns:

  • (Float)


59
60
61
# File 'lib/the_plaid_api/models/credit1099.rb', line 59

def fishing_boat_proceeds
  @fishing_boat_proceeds
end

#form_1099_typeForm1099Type

Form 1099 Type

Returns:



22
23
24
# File 'lib/the_plaid_api/models/credit1099.rb', line 22

def form_1099_type
  @form_1099_type
end

#gross_amountFloat

Gross amount reported.

Returns:

  • (Float)


136
137
138
# File 'lib/the_plaid_api/models/credit1099.rb', line 136

def gross_amount
  @gross_amount
end

#gross_proceeds_paid_to_an_attorneyFloat

Amount of gross proceeds paid to an attorney by payer.

Returns:

  • (Float)


87
88
89
# File 'lib/the_plaid_api/models/credit1099.rb', line 87

def gross_proceeds_paid_to_an_attorney
  @gross_proceeds_paid_to_an_attorney
end

#january_amountFloat

Amount reported for January.

Returns:

  • (Float)


152
153
154
# File 'lib/the_plaid_api/models/credit1099.rb', line 152

def january_amount
  @january_amount
end

#july_amountFloat

Amount reported for July.

Returns:

  • (Float)


176
177
178
# File 'lib/the_plaid_api/models/credit1099.rb', line 176

def july_amount
  @july_amount
end

#june_amountFloat

Amount reported for June.

Returns:

  • (Float)


172
173
174
# File 'lib/the_plaid_api/models/credit1099.rb', line 172

def june_amount
  @june_amount
end

#march_amountFloat

Amount reported for March.

Returns:

  • (Float)


160
161
162
# File 'lib/the_plaid_api/models/credit1099.rb', line 160

def march_amount
  @march_amount
end

#may_amountFloat

Amount reported for May.

Returns:

  • (Float)


168
169
170
# File 'lib/the_plaid_api/models/credit1099.rb', line 168

def may_amount
  @may_amount
end

#medical_and_healthcare_paymentsFloat

Amount of medical and healthcare payments from payer.

Returns:

  • (Float)


63
64
65
# File 'lib/the_plaid_api/models/credit1099.rb', line 63

def medical_and_healthcare_payments
  @medical_and_healthcare_payments
end

#merchant_category_codeString

Merchant category of filer.

Returns:

  • (String)


144
145
146
# File 'lib/the_plaid_api/models/credit1099.rb', line 144

def merchant_category_code
  @merchant_category_code
end

#nonemployee_compensationFloat

Amount of nonemployee compensation from payer.

Returns:

  • (Float)


67
68
69
# File 'lib/the_plaid_api/models/credit1099.rb', line 67

def nonemployee_compensation
  @nonemployee_compensation
end

#november_amountFloat

Amount reported for November.

Returns:

  • (Float)


192
193
194
# File 'lib/the_plaid_api/models/credit1099.rb', line 192

def november_amount
  @november_amount
end

#number_of_payment_transactionsString

Number of payment transactions made.

Returns:

  • (String)


148
149
150
# File 'lib/the_plaid_api/models/credit1099.rb', line 148

def number_of_payment_transactions
  @number_of_payment_transactions
end

#october_amountFloat

Amount reported for October.

Returns:

  • (Float)


188
189
190
# File 'lib/the_plaid_api/models/credit1099.rb', line 188

def october_amount
  @october_amount
end

#other_incomeFloat

Amount in other income by payer.

Returns:

  • (Float)


51
52
53
# File 'lib/the_plaid_api/models/credit1099.rb', line 51

def other_income
  @other_income
end

#payerCredit1099Payer

An object representing a payer used by 1099-MISC tax documents.

Returns:



31
32
33
# File 'lib/the_plaid_api/models/credit1099.rb', line 31

def payer
  @payer
end

#payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyerString

Whether or not payer made direct sales over $5000 of consumer products.

Returns:

  • (String)


75
76
77
# File 'lib/the_plaid_api/models/credit1099.rb', line 75

def payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer
  @payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer
end

#payer_state_numberString

Primary state ID.

Returns:

  • (String)


107
108
109
# File 'lib/the_plaid_api/models/credit1099.rb', line 107

def payer_state_number
  @payer_state_number
end

#payer_state_number_lowerString

Secondary state ID.

Returns:

  • (String)


111
112
113
# File 'lib/the_plaid_api/models/credit1099.rb', line 111

def payer_state_number_lower
  @payer_state_number_lower
end

#primary_stateString

Primary state of business.

Returns:

  • (String)


200
201
202
# File 'lib/the_plaid_api/models/credit1099.rb', line 200

def primary_state
  @primary_state
end

#primary_state_idString

Primary state ID.

Returns:

  • (String)


208
209
210
# File 'lib/the_plaid_api/models/credit1099.rb', line 208

def primary_state_id
  @primary_state_id
end

#primary_state_income_taxFloat

State income tax reported for primary state.

Returns:

  • (Float)


216
217
218
# File 'lib/the_plaid_api/models/credit1099.rb', line 216

def primary_state_income_tax
  @primary_state_income_tax
end

#pse_nameString

Name of the PSE (Payment Settlement Entity).

Returns:

  • (String)


127
128
129
# File 'lib/the_plaid_api/models/credit1099.rb', line 127

def pse_name
  @pse_name
end

#pse_telephone_numberString

Formatted (XXX) XXX-XXXX. Phone number of the PSE (Payment Settlement Entity).

Returns:

  • (String)


132
133
134
# File 'lib/the_plaid_api/models/credit1099.rb', line 132

def pse_telephone_number
  @pse_telephone_number
end

#recipientCredit1099Recipient

An object representing a recipient used in both 1099-K and 1099-MISC tax documents.

Returns:



27
28
29
# File 'lib/the_plaid_api/models/credit1099.rb', line 27

def recipient
  @recipient
end

#rentsFloat

Amount in rent by payer.

Returns:

  • (Float)


43
44
45
# File 'lib/the_plaid_api/models/credit1099.rb', line 43

def rents
  @rents
end

#royaltiesFloat

Amount in royalties by payer.

Returns:

  • (Float)


47
48
49
# File 'lib/the_plaid_api/models/credit1099.rb', line 47

def royalties
  @royalties
end

#secondary_stateString

Secondary state of business.

Returns:

  • (String)


204
205
206
# File 'lib/the_plaid_api/models/credit1099.rb', line 204

def secondary_state
  @secondary_state
end

#secondary_state_idString

Secondary state ID.

Returns:

  • (String)


212
213
214
# File 'lib/the_plaid_api/models/credit1099.rb', line 212

def secondary_state_id
  @secondary_state_id
end

#secondary_state_income_taxFloat

State income tax reported for secondary state.

Returns:

  • (Float)


220
221
222
# File 'lib/the_plaid_api/models/credit1099.rb', line 220

def secondary_state_income_tax
  @secondary_state_income_tax
end

#section_409a_deferralsFloat

Amount of 409A deferrals earned by payer.

Returns:

  • (Float)


91
92
93
# File 'lib/the_plaid_api/models/credit1099.rb', line 91

def section_409a_deferrals
  @section_409a_deferrals
end

#section_409a_incomeFloat

Amount of 409A income earned by payer.

Returns:

  • (Float)


95
96
97
# File 'lib/the_plaid_api/models/credit1099.rb', line 95

def section_409a_income
  @section_409a_income
end

#september_amountFloat

Amount reported for September.

Returns:

  • (Float)


184
185
186
# File 'lib/the_plaid_api/models/credit1099.rb', line 184

def september_amount
  @september_amount
end

#state_incomeFloat

State income reported for primary state.

Returns:

  • (Float)


115
116
117
# File 'lib/the_plaid_api/models/credit1099.rb', line 115

def state_income
  @state_income
end

#state_income_lowerFloat

State income reported for secondary state.

Returns:

  • (Float)


119
120
121
# File 'lib/the_plaid_api/models/credit1099.rb', line 119

def state_income_lower
  @state_income_lower
end

#state_tax_withheldFloat

Amount of state tax withheld of payer for primary state.

Returns:

  • (Float)


99
100
101
# File 'lib/the_plaid_api/models/credit1099.rb', line 99

def state_tax_withheld
  @state_tax_withheld
end

#state_tax_withheld_lowerFloat

Amount of state tax withheld of payer for secondary state.

Returns:

  • (Float)


103
104
105
# File 'lib/the_plaid_api/models/credit1099.rb', line 103

def state_tax_withheld_lower
  @state_tax_withheld_lower
end

#substitute_payments_in_lieu_of_dividends_or_interestFloat

Amount of substitute payments made by payer.

Returns:

  • (Float)


71
72
73
# File 'lib/the_plaid_api/models/credit1099.rb', line 71

def substitute_payments_in_lieu_of_dividends_or_interest
  @substitute_payments_in_lieu_of_dividends_or_interest
end

#tax_yearString

Tax year of the tax form.

Returns:

  • (String)


39
40
41
# File 'lib/the_plaid_api/models/credit1099.rb', line 39

def tax_year
  @tax_year
end

#transactions_reportedString

One of the values will be provided Payment card Third party network

Returns:

  • (String)


123
124
125
# File 'lib/the_plaid_api/models/credit1099.rb', line 123

def transactions_reported
  @transactions_reported
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
# File 'lib/the_plaid_api/models/credit1099.rb', line 507

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  document_id = hash.key?('document_id') ? hash['document_id'] : nil
   = CreditDocumentMetadata.from_hash(hash['document_metadata']) if
    hash['document_metadata']
  form_1099_type =
    hash.key?('form_1099_type') ? hash['form_1099_type'] : SKIP
  recipient = Credit1099Recipient.from_hash(hash['recipient']) if hash['recipient']
  payer = Credit1099Payer.from_hash(hash['payer']) if hash['payer']
  filer = Credit1099Filer.from_hash(hash['filer']) if hash['filer']
  tax_year = hash.key?('tax_year') ? hash['tax_year'] : SKIP
  rents = hash.key?('rents') ? hash['rents'] : SKIP
  royalties = hash.key?('royalties') ? hash['royalties'] : SKIP
  other_income = hash.key?('other_income') ? hash['other_income'] : SKIP
  federal_income_tax_withheld =
    hash.key?('federal_income_tax_withheld') ? hash['federal_income_tax_withheld'] : SKIP
  fishing_boat_proceeds =
    hash.key?('fishing_boat_proceeds') ? hash['fishing_boat_proceeds'] : SKIP
  medical_and_healthcare_payments =
    hash.key?('medical_and_healthcare_payments') ? hash['medical_and_healthcare_payments'] : SKIP
  nonemployee_compensation =
    hash.key?('nonemployee_compensation') ? hash['nonemployee_compensation'] : SKIP
  substitute_payments_in_lieu_of_dividends_or_interest =
    hash.key?('substitute_payments_in_lieu_of_dividends_or_interest') ? hash['substitute_payments_in_lieu_of_dividends_or_interest'] : SKIP
  payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer =
    hash.key?('payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer') ? hash['payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer'] : SKIP
  crop_insurance_proceeds =
    hash.key?('crop_insurance_proceeds') ? hash['crop_insurance_proceeds'] : SKIP
  excess_golden_parachute_payments =
    hash.key?('excess_golden_parachute_payments') ? hash['excess_golden_parachute_payments'] : SKIP
  gross_proceeds_paid_to_an_attorney =
    hash.key?('gross_proceeds_paid_to_an_attorney') ? hash['gross_proceeds_paid_to_an_attorney'] : SKIP
  section_409a_deferrals =
    hash.key?('section_409a_deferrals') ? hash['section_409a_deferrals'] : SKIP
  section_409a_income =
    hash.key?('section_409a_income') ? hash['section_409a_income'] : SKIP
  state_tax_withheld =
    hash.key?('state_tax_withheld') ? hash['state_tax_withheld'] : SKIP
  state_tax_withheld_lower =
    hash.key?('state_tax_withheld_lower') ? hash['state_tax_withheld_lower'] : SKIP
  payer_state_number =
    hash.key?('payer_state_number') ? hash['payer_state_number'] : SKIP
  payer_state_number_lower =
    hash.key?('payer_state_number_lower') ? hash['payer_state_number_lower'] : SKIP
  state_income = hash.key?('state_income') ? hash['state_income'] : SKIP
  state_income_lower =
    hash.key?('state_income_lower') ? hash['state_income_lower'] : SKIP
  transactions_reported =
    hash.key?('transactions_reported') ? hash['transactions_reported'] : SKIP
  pse_name = hash.key?('pse_name') ? hash['pse_name'] : SKIP
  pse_telephone_number =
    hash.key?('pse_telephone_number') ? hash['pse_telephone_number'] : SKIP
  gross_amount = hash.key?('gross_amount') ? hash['gross_amount'] : SKIP
  card_not_present_transaction =
    hash.key?('card_not_present_transaction') ? hash['card_not_present_transaction'] : SKIP
  merchant_category_code =
    hash.key?('merchant_category_code') ? hash['merchant_category_code'] : SKIP
  number_of_payment_transactions =
    hash.key?('number_of_payment_transactions') ? hash['number_of_payment_transactions'] : SKIP
  january_amount =
    hash.key?('january_amount') ? hash['january_amount'] : SKIP
  february_amount =
    hash.key?('february_amount') ? hash['february_amount'] : SKIP
  march_amount = hash.key?('march_amount') ? hash['march_amount'] : SKIP
  april_amount = hash.key?('april_amount') ? hash['april_amount'] : SKIP
  may_amount = hash.key?('may_amount') ? hash['may_amount'] : SKIP
  june_amount = hash.key?('june_amount') ? hash['june_amount'] : SKIP
  july_amount = hash.key?('july_amount') ? hash['july_amount'] : SKIP
  august_amount = hash.key?('august_amount') ? hash['august_amount'] : SKIP
  september_amount =
    hash.key?('september_amount') ? hash['september_amount'] : SKIP
  october_amount =
    hash.key?('october_amount') ? hash['october_amount'] : SKIP
  november_amount =
    hash.key?('november_amount') ? hash['november_amount'] : SKIP
  december_amount =
    hash.key?('december_amount') ? hash['december_amount'] : SKIP
  primary_state = hash.key?('primary_state') ? hash['primary_state'] : SKIP
  secondary_state =
    hash.key?('secondary_state') ? hash['secondary_state'] : SKIP
  primary_state_id =
    hash.key?('primary_state_id') ? hash['primary_state_id'] : SKIP
  secondary_state_id =
    hash.key?('secondary_state_id') ? hash['secondary_state_id'] : SKIP
  primary_state_income_tax =
    hash.key?('primary_state_income_tax') ? hash['primary_state_income_tax'] : SKIP
  secondary_state_income_tax =
    hash.key?('secondary_state_income_tax') ? hash['secondary_state_income_tax'] : 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.
  Credit1099.new(document_id: document_id,
                 document_metadata: ,
                 form_1099_type: form_1099_type,
                 recipient: recipient,
                 payer: payer,
                 filer: filer,
                 tax_year: tax_year,
                 rents: rents,
                 royalties: royalties,
                 other_income: other_income,
                 federal_income_tax_withheld: federal_income_tax_withheld,
                 fishing_boat_proceeds: fishing_boat_proceeds,
                 medical_and_healthcare_payments: medical_and_healthcare_payments,
                 nonemployee_compensation: nonemployee_compensation,
                 substitute_payments_in_lieu_of_dividends_or_interest: substitute_payments_in_lieu_of_dividends_or_interest,
                 payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer: payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer,
                 crop_insurance_proceeds: crop_insurance_proceeds,
                 excess_golden_parachute_payments: excess_golden_parachute_payments,
                 gross_proceeds_paid_to_an_attorney: gross_proceeds_paid_to_an_attorney,
                 section_409a_deferrals: section_409a_deferrals,
                 section_409a_income: section_409a_income,
                 state_tax_withheld: state_tax_withheld,
                 state_tax_withheld_lower: state_tax_withheld_lower,
                 payer_state_number: payer_state_number,
                 payer_state_number_lower: payer_state_number_lower,
                 state_income: state_income,
                 state_income_lower: state_income_lower,
                 transactions_reported: transactions_reported,
                 pse_name: pse_name,
                 pse_telephone_number: pse_telephone_number,
                 gross_amount: gross_amount,
                 card_not_present_transaction: card_not_present_transaction,
                 merchant_category_code: merchant_category_code,
                 number_of_payment_transactions: number_of_payment_transactions,
                 january_amount: january_amount,
                 february_amount: february_amount,
                 march_amount: march_amount,
                 april_amount: april_amount,
                 may_amount: may_amount,
                 june_amount: june_amount,
                 july_amount: july_amount,
                 august_amount: august_amount,
                 september_amount: september_amount,
                 october_amount: october_amount,
                 november_amount: november_amount,
                 december_amount: december_amount,
                 primary_state: primary_state,
                 secondary_state: secondary_state,
                 primary_state_id: primary_state_id,
                 secondary_state_id: secondary_state_id,
                 primary_state_income_tax: primary_state_income_tax,
                 secondary_state_income_tax: secondary_state_income_tax,
                 additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/the_plaid_api/models/credit1099.rb', line 223

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['document_id'] = 'document_id'
  @_hash['document_metadata'] = 'document_metadata'
  @_hash['form_1099_type'] = 'form_1099_type'
  @_hash['recipient'] = 'recipient'
  @_hash['payer'] = 'payer'
  @_hash['filer'] = 'filer'
  @_hash['tax_year'] = 'tax_year'
  @_hash['rents'] = 'rents'
  @_hash['royalties'] = 'royalties'
  @_hash['other_income'] = 'other_income'
  @_hash['federal_income_tax_withheld'] = 'federal_income_tax_withheld'
  @_hash['fishing_boat_proceeds'] = 'fishing_boat_proceeds'
  @_hash['medical_and_healthcare_payments'] =
    'medical_and_healthcare_payments'
  @_hash['nonemployee_compensation'] = 'nonemployee_compensation'
  @_hash['substitute_payments_in_lieu_of_dividends_or_interest'] =
    'substitute_payments_in_lieu_of_dividends_or_interest'
  @_hash['payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer'] =
    'payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer'
  @_hash['crop_insurance_proceeds'] = 'crop_insurance_proceeds'
  @_hash['excess_golden_parachute_payments'] =
    'excess_golden_parachute_payments'
  @_hash['gross_proceeds_paid_to_an_attorney'] =
    'gross_proceeds_paid_to_an_attorney'
  @_hash['section_409a_deferrals'] = 'section_409a_deferrals'
  @_hash['section_409a_income'] = 'section_409a_income'
  @_hash['state_tax_withheld'] = 'state_tax_withheld'
  @_hash['state_tax_withheld_lower'] = 'state_tax_withheld_lower'
  @_hash['payer_state_number'] = 'payer_state_number'
  @_hash['payer_state_number_lower'] = 'payer_state_number_lower'
  @_hash['state_income'] = 'state_income'
  @_hash['state_income_lower'] = 'state_income_lower'
  @_hash['transactions_reported'] = 'transactions_reported'
  @_hash['pse_name'] = 'pse_name'
  @_hash['pse_telephone_number'] = 'pse_telephone_number'
  @_hash['gross_amount'] = 'gross_amount'
  @_hash['card_not_present_transaction'] = 'card_not_present_transaction'
  @_hash['merchant_category_code'] = 'merchant_category_code'
  @_hash['number_of_payment_transactions'] =
    'number_of_payment_transactions'
  @_hash['january_amount'] = 'january_amount'
  @_hash['february_amount'] = 'february_amount'
  @_hash['march_amount'] = 'march_amount'
  @_hash['april_amount'] = 'april_amount'
  @_hash['may_amount'] = 'may_amount'
  @_hash['june_amount'] = 'june_amount'
  @_hash['july_amount'] = 'july_amount'
  @_hash['august_amount'] = 'august_amount'
  @_hash['september_amount'] = 'september_amount'
  @_hash['october_amount'] = 'october_amount'
  @_hash['november_amount'] = 'november_amount'
  @_hash['december_amount'] = 'december_amount'
  @_hash['primary_state'] = 'primary_state'
  @_hash['secondary_state'] = 'secondary_state'
  @_hash['primary_state_id'] = 'primary_state_id'
  @_hash['secondary_state_id'] = 'secondary_state_id'
  @_hash['primary_state_income_tax'] = 'primary_state_income_tax'
  @_hash['secondary_state_income_tax'] = 'secondary_state_income_tax'
  @_hash
end

.nullablesObject

An array for nullable fields



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
384
385
386
387
388
389
390
391
392
393
394
# File 'lib/the_plaid_api/models/credit1099.rb', line 344

def self.nullables
  %w[
    document_id
    tax_year
    rents
    royalties
    other_income
    federal_income_tax_withheld
    fishing_boat_proceeds
    medical_and_healthcare_payments
    nonemployee_compensation
    substitute_payments_in_lieu_of_dividends_or_interest
    payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer
    crop_insurance_proceeds
    excess_golden_parachute_payments
    gross_proceeds_paid_to_an_attorney
    section_409a_deferrals
    section_409a_income
    state_tax_withheld
    state_tax_withheld_lower
    payer_state_number
    payer_state_number_lower
    state_income
    state_income_lower
    transactions_reported
    pse_name
    pse_telephone_number
    gross_amount
    card_not_present_transaction
    merchant_category_code
    number_of_payment_transactions
    january_amount
    february_amount
    march_amount
    april_amount
    may_amount
    june_amount
    july_amount
    august_amount
    september_amount
    october_amount
    november_amount
    december_amount
    primary_state
    secondary_state
    primary_state_id
    secondary_state_id
    primary_state_income_tax
    secondary_state_income_tax
  ]
end

.optionalsObject

An array for optional fields



287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/the_plaid_api/models/credit1099.rb', line 287

def self.optionals
  %w[
    document_metadata
    form_1099_type
    recipient
    payer
    filer
    tax_year
    rents
    royalties
    other_income
    federal_income_tax_withheld
    fishing_boat_proceeds
    medical_and_healthcare_payments
    nonemployee_compensation
    substitute_payments_in_lieu_of_dividends_or_interest
    payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer
    crop_insurance_proceeds
    excess_golden_parachute_payments
    gross_proceeds_paid_to_an_attorney
    section_409a_deferrals
    section_409a_income
    state_tax_withheld
    state_tax_withheld_lower
    payer_state_number
    payer_state_number_lower
    state_income
    state_income_lower
    transactions_reported
    pse_name
    pse_telephone_number
    gross_amount
    card_not_present_transaction
    merchant_category_code
    number_of_payment_transactions
    january_amount
    february_amount
    march_amount
    april_amount
    may_amount
    june_amount
    july_amount
    august_amount
    september_amount
    october_amount
    november_amount
    december_amount
    primary_state
    secondary_state
    primary_state_id
    secondary_state_id
    primary_state_income_tax
    secondary_state_income_tax
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



699
700
701
702
703
704
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
739
# File 'lib/the_plaid_api/models/credit1099.rb', line 699

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} document_id: #{@document_id.inspect}, document_metadata:"\
  " #{@document_metadata.inspect}, form_1099_type: #{@form_1099_type.inspect}, recipient:"\
  " #{@recipient.inspect}, payer: #{@payer.inspect}, filer: #{@filer.inspect}, tax_year:"\
  " #{@tax_year.inspect}, rents: #{@rents.inspect}, royalties: #{@royalties.inspect},"\
  " other_income: #{@other_income.inspect}, federal_income_tax_withheld:"\
  " #{@federal_income_tax_withheld.inspect}, fishing_boat_proceeds:"\
  " #{@fishing_boat_proceeds.inspect}, medical_and_healthcare_payments:"\
  " #{@medical_and_healthcare_payments.inspect}, nonemployee_compensation:"\
  " #{@nonemployee_compensation.inspect},"\
  ' substitute_payments_in_lieu_of_dividends_or_interest:'\
  " #{@substitute_payments_in_lieu_of_dividends_or_interest.inspect},"\
  ' payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer:'\
  " #{@payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer.inspect},"\
  " crop_insurance_proceeds: #{@crop_insurance_proceeds.inspect},"\
  " excess_golden_parachute_payments: #{@excess_golden_parachute_payments.inspect},"\
  " gross_proceeds_paid_to_an_attorney: #{@gross_proceeds_paid_to_an_attorney.inspect},"\
  " section_409a_deferrals: #{@section_409a_deferrals.inspect}, section_409a_income:"\
  " #{@section_409a_income.inspect}, state_tax_withheld: #{@state_tax_withheld.inspect},"\
  " state_tax_withheld_lower: #{@state_tax_withheld_lower.inspect}, payer_state_number:"\
  " #{@payer_state_number.inspect}, payer_state_number_lower:"\
  " #{@payer_state_number_lower.inspect}, state_income: #{@state_income.inspect},"\
  " state_income_lower: #{@state_income_lower.inspect}, transactions_reported:"\
  " #{@transactions_reported.inspect}, pse_name: #{@pse_name.inspect}, pse_telephone_number:"\
  " #{@pse_telephone_number.inspect}, gross_amount: #{@gross_amount.inspect},"\
  " card_not_present_transaction: #{@card_not_present_transaction.inspect},"\
  " merchant_category_code: #{@merchant_category_code.inspect},"\
  " number_of_payment_transactions: #{@number_of_payment_transactions.inspect},"\
  " january_amount: #{@january_amount.inspect}, february_amount: #{@february_amount.inspect},"\
  " march_amount: #{@march_amount.inspect}, april_amount: #{@april_amount.inspect},"\
  " may_amount: #{@may_amount.inspect}, june_amount: #{@june_amount.inspect}, july_amount:"\
  " #{@july_amount.inspect}, august_amount: #{@august_amount.inspect}, september_amount:"\
  " #{@september_amount.inspect}, october_amount: #{@october_amount.inspect}, november_amount:"\
  " #{@november_amount.inspect}, december_amount: #{@december_amount.inspect}, primary_state:"\
  " #{@primary_state.inspect}, secondary_state: #{@secondary_state.inspect}, primary_state_id:"\
  " #{@primary_state_id.inspect}, secondary_state_id: #{@secondary_state_id.inspect},"\
  " primary_state_income_tax: #{@primary_state_income_tax.inspect},"\
  " secondary_state_income_tax: #{@secondary_state_income_tax.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
# File 'lib/the_plaid_api/models/credit1099.rb', line 662

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} document_id: #{@document_id}, document_metadata: #{@document_metadata},"\
  " form_1099_type: #{@form_1099_type}, recipient: #{@recipient}, payer: #{@payer}, filer:"\
  " #{@filer}, tax_year: #{@tax_year}, rents: #{@rents}, royalties: #{@royalties},"\
  " other_income: #{@other_income}, federal_income_tax_withheld:"\
  " #{@federal_income_tax_withheld}, fishing_boat_proceeds: #{@fishing_boat_proceeds},"\
  " medical_and_healthcare_payments: #{@medical_and_healthcare_payments},"\
  " nonemployee_compensation: #{@nonemployee_compensation},"\
  ' substitute_payments_in_lieu_of_dividends_or_interest:'\
  " #{@substitute_payments_in_lieu_of_dividends_or_interest},"\
  ' payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer:'\
  " #{@payer_made_direct_sales_of_5000_or_more_of_consumer_products_to_buyer},"\
  " crop_insurance_proceeds: #{@crop_insurance_proceeds}, excess_golden_parachute_payments:"\
  " #{@excess_golden_parachute_payments}, gross_proceeds_paid_to_an_attorney:"\
  " #{@gross_proceeds_paid_to_an_attorney}, section_409a_deferrals:"\
  " #{@section_409a_deferrals}, section_409a_income: #{@section_409a_income},"\
  " state_tax_withheld: #{@state_tax_withheld}, state_tax_withheld_lower:"\
  " #{@state_tax_withheld_lower}, payer_state_number: #{@payer_state_number},"\
  " payer_state_number_lower: #{@payer_state_number_lower}, state_income: #{@state_income},"\
  " state_income_lower: #{@state_income_lower}, transactions_reported:"\
  " #{@transactions_reported}, pse_name: #{@pse_name}, pse_telephone_number:"\
  " #{@pse_telephone_number}, gross_amount: #{@gross_amount}, card_not_present_transaction:"\
  " #{@card_not_present_transaction}, merchant_category_code: #{@merchant_category_code},"\
  " number_of_payment_transactions: #{@number_of_payment_transactions}, january_amount:"\
  " #{@january_amount}, february_amount: #{@february_amount}, march_amount: #{@march_amount},"\
  " april_amount: #{@april_amount}, may_amount: #{@may_amount}, june_amount: #{@june_amount},"\
  " july_amount: #{@july_amount}, august_amount: #{@august_amount}, september_amount:"\
  " #{@september_amount}, october_amount: #{@october_amount}, november_amount:"\
  " #{@november_amount}, december_amount: #{@december_amount}, primary_state:"\
  " #{@primary_state}, secondary_state: #{@secondary_state}, primary_state_id:"\
  " #{@primary_state_id}, secondary_state_id: #{@secondary_state_id},"\
  " primary_state_income_tax: #{@primary_state_income_tax}, secondary_state_income_tax:"\
  " #{@secondary_state_income_tax}, additional_properties: #{@additional_properties}>"
end