Class: FdxV660Api::Form1042S

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

Overview

Foreign Person's U.S. Source Income Subject to Withholding, from WithholdingAgent (boxes 12a-e, 12g-m) to Recipient (boxes 13a, 13c-n, 13p as form1042Recipient)

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, form_id: SKIP, amended: SKIP, amendment_number: SKIP, income_type_code: SKIP, gross_income: SKIP, chapter_indicator: SKIP, ch3_exemption_code: SKIP, ch3_tax_rate: SKIP, ch4_exemption_code: SKIP, ch4_tax_rate: SKIP, withholding_allowance: SKIP, net_income: SKIP, federal_tax_withheld: SKIP, escrow_procedures_applied: SKIP, subsequent_year: SKIP, revised_reporting: SKIP, other_agents_tax_withheld: SKIP, recipient_repaid_amount: SKIP, total_tax_withholding_credit: SKIP, withholding_agent_tax_paid: SKIP, withholding_agent: SKIP, withholding_agent_country: SKIP, form1042_recipient: SKIP, recipient_country: SKIP, account_number: SKIP, primary: SKIP, prorata_basis_reporting: SKIP, intermediary: SKIP, intermediary_country: SKIP, payer: SKIP, state_and_local: SKIP, additional_properties: nil) ⇒ Form1042S

Returns a new instance of Form1042S.



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

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, form_id: SKIP, amended: SKIP,
               amendment_number: SKIP, income_type_code: SKIP,
               gross_income: SKIP, chapter_indicator: SKIP,
               ch3_exemption_code: SKIP, ch3_tax_rate: SKIP,
               ch4_exemption_code: SKIP, ch4_tax_rate: SKIP,
               withholding_allowance: SKIP, net_income: SKIP,
               federal_tax_withheld: SKIP, escrow_procedures_applied: SKIP,
               subsequent_year: SKIP, revised_reporting: SKIP,
               other_agents_tax_withheld: SKIP,
               recipient_repaid_amount: SKIP,
               total_tax_withholding_credit: SKIP,
               withholding_agent_tax_paid: SKIP, withholding_agent: SKIP,
               withholding_agent_country: SKIP, form1042_recipient: SKIP,
               recipient_country: SKIP, account_number: SKIP, primary: SKIP,
               prorata_basis_reporting: SKIP, intermediary: SKIP,
               intermediary_country: SKIP, payer: SKIP,
               state_and_local: 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
  @form_id = form_id unless form_id == SKIP
  @amended = amended unless amended == SKIP
  @amendment_number = amendment_number unless amendment_number == SKIP
  @income_type_code = income_type_code unless income_type_code == SKIP
  @gross_income = gross_income unless gross_income == SKIP
  @chapter_indicator = chapter_indicator unless chapter_indicator == SKIP
  @ch3_exemption_code = ch3_exemption_code unless ch3_exemption_code == SKIP
  @ch3_tax_rate = ch3_tax_rate unless ch3_tax_rate == SKIP
  @ch4_exemption_code = ch4_exemption_code unless ch4_exemption_code == SKIP
  @ch4_tax_rate = ch4_tax_rate unless ch4_tax_rate == SKIP
  @withholding_allowance = withholding_allowance unless withholding_allowance == SKIP
  @net_income = net_income unless net_income == SKIP
  @federal_tax_withheld = federal_tax_withheld unless federal_tax_withheld == SKIP
  unless escrow_procedures_applied == SKIP
    @escrow_procedures_applied =
      escrow_procedures_applied
  end
  @subsequent_year = subsequent_year unless subsequent_year == SKIP
  @revised_reporting = revised_reporting unless revised_reporting == SKIP
  unless other_agents_tax_withheld == SKIP
    @other_agents_tax_withheld =
      other_agents_tax_withheld
  end
  @recipient_repaid_amount = recipient_repaid_amount unless recipient_repaid_amount == SKIP
  unless total_tax_withholding_credit == SKIP
    @total_tax_withholding_credit =
      total_tax_withholding_credit
  end
  unless withholding_agent_tax_paid == SKIP
    @withholding_agent_tax_paid =
      withholding_agent_tax_paid
  end
  @withholding_agent = withholding_agent unless withholding_agent == SKIP
  unless withholding_agent_country == SKIP
    @withholding_agent_country =
      withholding_agent_country
  end
  @form1042_recipient = form1042_recipient unless form1042_recipient == SKIP
  @recipient_country = recipient_country unless recipient_country == SKIP
  @account_number =  unless  == SKIP
  @primary = primary unless primary == SKIP
  @prorata_basis_reporting = prorata_basis_reporting unless prorata_basis_reporting == SKIP
  @intermediary = intermediary unless intermediary == SKIP
  @intermediary_country = intermediary_country unless intermediary_country == SKIP
  @payer = payer unless payer == SKIP
  @state_and_local = state_and_local unless state_and_local == 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)


25
26
27
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 25

def 
  @account_id
end

#account_numberString

Box 13o, Recipient account number

Returns:

  • (String)


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

def 
  @account_number
end

#additional_informationString

Additional explanation text or content about this tax form

Returns:

  • (String)


39
40
41
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 39

def additional_information
  @additional_information
end

#amendedTrueClass | FalseClass

Amended

Returns:

  • (TrueClass | FalseClass)


81
82
83
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 81

def amended
  @amended
end

#amendment_numberInteger

Amendment number

Returns:

  • (Integer)


85
86
87
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 85

def amendment_number
  @amendment_number
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:



65
66
67
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 65

def attributes
  @attributes
end

#ch3_exemption_codeString

Box 3a, Exemption code

Returns:

  • (String)


101
102
103
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 101

def ch3_exemption_code
  @ch3_exemption_code
end

#ch3_tax_rateFloat

Box 3b, Tax rate

Returns:

  • (Float)


105
106
107
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 105

def ch3_tax_rate
  @ch3_tax_rate
end

#ch4_exemption_codeString

Box 4a, Exemption code

Returns:

  • (String)


109
110
111
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 109

def ch4_exemption_code
  @ch4_exemption_code
end

#ch4_tax_rateFloat

Box 4b, Tax rate

Returns:

  • (Float)


113
114
115
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 113

def ch4_tax_rate
  @ch4_tax_rate
end

#chapter_indicatorString

Box 3, Chapter indicator, either '3' or '4'

Returns:

  • (String)


97
98
99
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 97

def chapter_indicator
  @chapter_indicator
end

#correctedTrueClass | FalseClass

True to indicate this is a corrected tax form

Returns:

  • (TrueClass | FalseClass)


20
21
22
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 20

def corrected
  @corrected
end

#errorError2

Present if an error was encountered while retrieving this form

Returns:



69
70
71
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 69

def error
  @error
end

#escrow_procedures_appliedTrueClass | FalseClass

Box 7b, Check if federal tax withheld was not deposited with the IRS because escrow procedures were applied

Returns:

  • (TrueClass | FalseClass)


130
131
132
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 130

def escrow_procedures_applied
  @escrow_procedures_applied
end

#federal_tax_withheldFloat

Box 7a, Federal tax withheld

Returns:

  • (Float)


125
126
127
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 125

def federal_tax_withheld
  @federal_tax_withheld
end

#form1042_recipientForm1042SRecipient1

Boxes 13a, 13c-n, 13p, Recipient for Form 1042-S

Returns:



171
172
173
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 171

def form1042_recipient
  @form1042_recipient
end

#form_idString

Unique form identifier

Returns:

  • (String)


77
78
79
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 77

def form_id
  @form_id
end

#gross_incomeFloat

Box 2, Gross income

Returns:

  • (Float)


93
94
95
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 93

def gross_income
  @gross_income
end

#income_type_codeString

Box 1, Income code

Returns:

  • (String)


89
90
91
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 89

def income_type_code
  @income_type_code
end

#intermediaryForm1042SAgent3

Boxes 15a-e, 15g-m, Intermediary or flow thru entity

Returns:



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

def intermediary
  @intermediary
end

#intermediary_countryString

Box 15f, IRS country code for Intermediary. See IRS Country Codes

Returns:

  • (String)


197
198
199
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 197

def intermediary_country
  @intermediary_country
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:



49
50
51
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 49

def issuer
  @issuer
end

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

Returns:



73
74
75
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 73

def links
  @links
end

#net_incomeFloat

Box 6, Net income

Returns:

  • (Float)


121
122
123
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 121

def net_income
  @net_income
end

#other_agents_tax_withheldFloat

Box 8, Tax withheld by other agents

Returns:

  • (Float)


145
146
147
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 145

def other_agents_tax_withheld
  @other_agents_tax_withheld
end

#payerForm1042SAgent4

Boxes 16a-e, Payer

Returns:



201
202
203
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 201

def payer
  @payer
end

#primaryForm1042SAgent2

Boxes 14a-b, Primary Withholding Agent

Returns:



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

def primary
  @primary
end

#prorata_basis_reportingTrueClass | FalseClass

Box 15, Check if pro-rata basis reporting

Returns:

  • (TrueClass | FalseClass)


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

def prorata_basis_reporting
  @prorata_basis_reporting
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:



55
56
57
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 55

def recipient
  @recipient
end

#recipient_countryString

Box 13b, IRS country code for Recipient. See IRS Country Codes

Returns:

  • (String)


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

def recipient_country
  @recipient_country
end

#recipient_repaid_amountFloat

Box 9, Overwithheld tax repaid to recipient pursuant to adjustment procedures

Returns:

  • (Float)


150
151
152
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 150

def recipient_repaid_amount
  @recipient_repaid_amount
end

#revised_reportingTrueClass | FalseClass

Box 7d, Check if you are a qualified intermediary, withholding foreign partnership, or withholding foreign trust revising its reporting on Form 1042-S to report to a specific recipient. Added for tax year 2025

Returns:

  • (TrueClass | FalseClass)


141
142
143
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 141

def revised_reporting
  @revised_reporting
end

#state_and_localStateAndLocalTaxWithholding1

Box 17, State and Local tax withholding



205
206
207
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 205

def state_and_local
  @state_and_local
end

#subsequent_yearTrueClass | FalseClass

Box 7c, Check if withholding occurred in subsequent year with respect to a partnership interest

Returns:

  • (TrueClass | FalseClass)


135
136
137
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 135

def subsequent_year
  @subsequent_year
end

#tax_form_dateDate

Date of production or delivery of the tax form

Returns:

  • (Date)


35
36
37
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 35

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)


31
32
33
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 31

def tax_form_id
  @tax_form_id
end

#tax_form_typeTypeFormType1

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

Returns:



43
44
45
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 43

def tax_form_type
  @tax_form_type
end

#tax_yearInteger

Year for which taxes are being paid

Returns:

  • (Integer)


16
17
18
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 16

def tax_year
  @tax_year
end

#total_tax_withholding_creditFloat

Box 10, Total withholding credit (combine boxes 7a, 8, and 9)

Returns:

  • (Float)


154
155
156
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 154

def total_tax_withholding_credit
  @total_tax_withholding_credit
end

#withholding_agentForm1042SAgent1

Boxes 12a-e & 12g-m, Withholding agent

Returns:



162
163
164
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 162

def withholding_agent
  @withholding_agent
end

#withholding_agent_countryString

Box 12f, IRS country code for Withholding Agent. See IRS Country Codes

Returns:

  • (String)


167
168
169
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 167

def withholding_agent_country
  @withholding_agent_country
end

#withholding_agent_tax_paidFloat

Box 11, Tax paid by withholding agent (amounts not withheld)

Returns:

  • (Float)


158
159
160
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 158

def withholding_agent_tax_paid
  @withholding_agent_tax_paid
end

#withholding_allowanceFloat

Box 5, Withholding allowance

Returns:

  • (Float)


117
118
119
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 117

def withholding_allowance
  @withholding_allowance
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

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')
  form_id = hash.key?('formId') ? hash['formId'] : SKIP
  amended = hash.key?('amended') ? hash['amended'] : SKIP
  amendment_number =
    hash.key?('amendmentNumber') ? hash['amendmentNumber'] : SKIP
  income_type_code =
    hash.key?('incomeTypeCode') ? hash['incomeTypeCode'] : SKIP
  gross_income = hash.key?('grossIncome') ? hash['grossIncome'] : SKIP
  chapter_indicator =
    hash.key?('chapterIndicator') ? hash['chapterIndicator'] : SKIP
  ch3_exemption_code =
    hash.key?('ch3ExemptionCode') ? hash['ch3ExemptionCode'] : SKIP
  ch3_tax_rate = hash.key?('ch3TaxRate') ? hash['ch3TaxRate'] : SKIP
  ch4_exemption_code =
    hash.key?('ch4ExemptionCode') ? hash['ch4ExemptionCode'] : SKIP
  ch4_tax_rate = hash.key?('ch4TaxRate') ? hash['ch4TaxRate'] : SKIP
  withholding_allowance =
    hash.key?('withholdingAllowance') ? hash['withholdingAllowance'] : SKIP
  net_income = hash.key?('netIncome') ? hash['netIncome'] : SKIP
  federal_tax_withheld =
    hash.key?('federalTaxWithheld') ? hash['federalTaxWithheld'] : SKIP
  escrow_procedures_applied =
    hash.key?('escrowProceduresApplied') ? hash['escrowProceduresApplied'] : SKIP
  subsequent_year =
    hash.key?('subsequentYear') ? hash['subsequentYear'] : SKIP
  revised_reporting =
    hash.key?('revisedReporting') ? hash['revisedReporting'] : SKIP
  other_agents_tax_withheld =
    hash.key?('otherAgentsTaxWithheld') ? hash['otherAgentsTaxWithheld'] : SKIP
  recipient_repaid_amount =
    hash.key?('recipientRepaidAmount') ? hash['recipientRepaidAmount'] : SKIP
  total_tax_withholding_credit =
    hash.key?('totalTaxWithholdingCredit') ? hash['totalTaxWithholdingCredit'] : SKIP
  withholding_agent_tax_paid =
    hash.key?('withholdingAgentTaxPaid') ? hash['withholdingAgentTaxPaid'] : SKIP
  withholding_agent = Form1042SAgent1.from_hash(hash['withholdingAgent']) if
    hash['withholdingAgent']
  withholding_agent_country =
    hash.key?('withholdingAgentCountry') ? hash['withholdingAgentCountry'] : SKIP
  form1042_recipient = Form1042SRecipient1.from_hash(hash['form1042Recipient']) if
    hash['form1042Recipient']
  recipient_country =
    hash.key?('recipientCountry') ? hash['recipientCountry'] : SKIP
   = hash.key?('accountNumber') ? hash['accountNumber'] : SKIP
  primary = Form1042SAgent2.from_hash(hash['primary']) if hash['primary']
  prorata_basis_reporting =
    hash.key?('prorataBasisReporting') ? hash['prorataBasisReporting'] : SKIP
  intermediary = Form1042SAgent3.from_hash(hash['intermediary']) if hash['intermediary']
  intermediary_country =
    hash.key?('intermediaryCountry') ? hash['intermediaryCountry'] : SKIP
  payer = Form1042SAgent4.from_hash(hash['payer']) if hash['payer']
  state_and_local = StateAndLocalTaxWithholding1.from_hash(hash['stateAndLocal']) if
    hash['stateAndLocal']

  # 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.
  Form1042S.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,
                form_id: form_id,
                amended: amended,
                amendment_number: amendment_number,
                income_type_code: income_type_code,
                gross_income: gross_income,
                chapter_indicator: chapter_indicator,
                ch3_exemption_code: ch3_exemption_code,
                ch3_tax_rate: ch3_tax_rate,
                ch4_exemption_code: ch4_exemption_code,
                ch4_tax_rate: ch4_tax_rate,
                withholding_allowance: withholding_allowance,
                net_income: net_income,
                federal_tax_withheld: federal_tax_withheld,
                escrow_procedures_applied: escrow_procedures_applied,
                subsequent_year: subsequent_year,
                revised_reporting: revised_reporting,
                other_agents_tax_withheld: other_agents_tax_withheld,
                recipient_repaid_amount: recipient_repaid_amount,
                total_tax_withholding_credit: total_tax_withholding_credit,
                withholding_agent_tax_paid: withholding_agent_tax_paid,
                withholding_agent: withholding_agent,
                withholding_agent_country: withholding_agent_country,
                form1042_recipient: form1042_recipient,
                recipient_country: recipient_country,
                account_number: ,
                primary: primary,
                prorata_basis_reporting: prorata_basis_reporting,
                intermediary: intermediary,
                intermediary_country: intermediary_country,
                payer: payer,
                state_and_local: state_and_local,
                additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



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
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 208

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['form_id'] = 'formId'
  @_hash['amended'] = 'amended'
  @_hash['amendment_number'] = 'amendmentNumber'
  @_hash['income_type_code'] = 'incomeTypeCode'
  @_hash['gross_income'] = 'grossIncome'
  @_hash['chapter_indicator'] = 'chapterIndicator'
  @_hash['ch3_exemption_code'] = 'ch3ExemptionCode'
  @_hash['ch3_tax_rate'] = 'ch3TaxRate'
  @_hash['ch4_exemption_code'] = 'ch4ExemptionCode'
  @_hash['ch4_tax_rate'] = 'ch4TaxRate'
  @_hash['withholding_allowance'] = 'withholdingAllowance'
  @_hash['net_income'] = 'netIncome'
  @_hash['federal_tax_withheld'] = 'federalTaxWithheld'
  @_hash['escrow_procedures_applied'] = 'escrowProceduresApplied'
  @_hash['subsequent_year'] = 'subsequentYear'
  @_hash['revised_reporting'] = 'revisedReporting'
  @_hash['other_agents_tax_withheld'] = 'otherAgentsTaxWithheld'
  @_hash['recipient_repaid_amount'] = 'recipientRepaidAmount'
  @_hash['total_tax_withholding_credit'] = 'totalTaxWithholdingCredit'
  @_hash['withholding_agent_tax_paid'] = 'withholdingAgentTaxPaid'
  @_hash['withholding_agent'] = 'withholdingAgent'
  @_hash['withholding_agent_country'] = 'withholdingAgentCountry'
  @_hash['form1042_recipient'] = 'form1042Recipient'
  @_hash['recipient_country'] = 'recipientCountry'
  @_hash['account_number'] = 'accountNumber'
  @_hash['primary'] = 'primary'
  @_hash['prorata_basis_reporting'] = 'prorataBasisReporting'
  @_hash['intermediary'] = 'intermediary'
  @_hash['intermediary_country'] = 'intermediaryCountry'
  @_hash['payer'] = 'payer'
  @_hash['state_and_local'] = 'stateAndLocal'
  @_hash
end

.nullablesObject

An array for nullable fields



306
307
308
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 306

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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
294
295
296
297
298
299
300
301
302
303
# File 'lib/fdx_v660_api/models/form1042_s.rb', line 257

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
    form_id
    amended
    amendment_number
    income_type_code
    gross_income
    chapter_indicator
    ch3_exemption_code
    ch3_tax_rate
    ch4_exemption_code
    ch4_tax_rate
    withholding_allowance
    net_income
    federal_tax_withheld
    escrow_procedures_applied
    subsequent_year
    revised_reporting
    other_agents_tax_withheld
    recipient_repaid_amount
    total_tax_withholding_credit
    withholding_agent_tax_paid
    withholding_agent
    withholding_agent_country
    form1042_recipient
    recipient_country
    account_number
    primary
    prorata_basis_reporting
    intermediary
    intermediary_country
    payer
    state_and_local
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



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

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}, form_id: #{@form_id.inspect}, amended: #{@amended.inspect},"\
  " amendment_number: #{@amendment_number.inspect}, income_type_code:"\
  " #{@income_type_code.inspect}, gross_income: #{@gross_income.inspect}, chapter_indicator:"\
  " #{@chapter_indicator.inspect}, ch3_exemption_code: #{@ch3_exemption_code.inspect},"\
  " ch3_tax_rate: #{@ch3_tax_rate.inspect}, ch4_exemption_code:"\
  " #{@ch4_exemption_code.inspect}, ch4_tax_rate: #{@ch4_tax_rate.inspect},"\
  " withholding_allowance: #{@withholding_allowance.inspect}, net_income:"\
  " #{@net_income.inspect}, federal_tax_withheld: #{@federal_tax_withheld.inspect},"\
  " escrow_procedures_applied: #{@escrow_procedures_applied.inspect}, subsequent_year:"\
  " #{@subsequent_year.inspect}, revised_reporting: #{@revised_reporting.inspect},"\
  " other_agents_tax_withheld: #{@other_agents_tax_withheld.inspect}, recipient_repaid_amount:"\
  " #{@recipient_repaid_amount.inspect}, total_tax_withholding_credit:"\
  " #{@total_tax_withholding_credit.inspect}, withholding_agent_tax_paid:"\
  " #{@withholding_agent_tax_paid.inspect}, withholding_agent: #{@withholding_agent.inspect},"\
  " withholding_agent_country: #{@withholding_agent_country.inspect}, form1042_recipient:"\
  " #{@form1042_recipient.inspect}, recipient_country: #{@recipient_country.inspect},"\
  " account_number: #{@account_number.inspect}, primary: #{@primary.inspect},"\
  " prorata_basis_reporting: #{@prorata_basis_reporting.inspect}, intermediary:"\
  " #{@intermediary.inspect}, intermediary_country: #{@intermediary_country.inspect}, payer:"\
  " #{@payer.inspect}, state_and_local: #{@state_and_local.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



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

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}, form_id: #{@form_id}, amended: #{@amended}, amendment_number:"\
  " #{@amendment_number}, income_type_code: #{@income_type_code}, gross_income:"\
  " #{@gross_income}, chapter_indicator: #{@chapter_indicator}, ch3_exemption_code:"\
  " #{@ch3_exemption_code}, ch3_tax_rate: #{@ch3_tax_rate}, ch4_exemption_code:"\
  " #{@ch4_exemption_code}, ch4_tax_rate: #{@ch4_tax_rate}, withholding_allowance:"\
  " #{@withholding_allowance}, net_income: #{@net_income}, federal_tax_withheld:"\
  " #{@federal_tax_withheld}, escrow_procedures_applied: #{@escrow_procedures_applied},"\
  " subsequent_year: #{@subsequent_year}, revised_reporting: #{@revised_reporting},"\
  " other_agents_tax_withheld: #{@other_agents_tax_withheld}, recipient_repaid_amount:"\
  " #{@recipient_repaid_amount}, total_tax_withholding_credit:"\
  " #{@total_tax_withholding_credit}, withholding_agent_tax_paid:"\
  " #{@withholding_agent_tax_paid}, withholding_agent: #{@withholding_agent},"\
  " withholding_agent_country: #{@withholding_agent_country}, form1042_recipient:"\
  " #{@form1042_recipient}, recipient_country: #{@recipient_country}, account_number:"\
  " #{@account_number}, primary: #{@primary}, prorata_basis_reporting:"\
  " #{@prorata_basis_reporting}, intermediary: #{@intermediary}, intermediary_country:"\
  " #{@intermediary_country}, payer: #{@payer}, state_and_local: #{@state_and_local},"\
  " additional_properties: #{@additional_properties}>"
end