Class: FdxV660Api::K1OtherIncome1

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

Overview

Schedule K-1 Supplemental Other Income Information

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(remic_taxable_income: SKIP, remic_excess_inclusion: SKIP, remic_section212: SKIP, recoveries: SKIP, gambling_winnings: SKIP, gambling_losses: SKIP, section751b: SKIP, specially_allocated_ordinary: SKIP, specially_allocated_short_term: SKIP, specially_allocated_long_term: SKIP, specially_allocated28_percent: SKIP, additional_properties: nil) ⇒ K1OtherIncome1

Returns a new instance of K1OtherIncome1.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/fdx_v660_api/models/k1_other_income1.rb', line 104

def initialize(remic_taxable_income: SKIP, remic_excess_inclusion: SKIP,
               remic_section212: SKIP, recoveries: SKIP,
               gambling_winnings: SKIP, gambling_losses: SKIP,
               section751b: SKIP, specially_allocated_ordinary: SKIP,
               specially_allocated_short_term: SKIP,
               specially_allocated_long_term: SKIP,
               specially_allocated28_percent: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @remic_taxable_income = remic_taxable_income unless remic_taxable_income == SKIP
  @remic_excess_inclusion = remic_excess_inclusion unless remic_excess_inclusion == SKIP
  @remic_section212 = remic_section212 unless remic_section212 == SKIP
  @recoveries = recoveries unless recoveries == SKIP
  @gambling_winnings = gambling_winnings unless gambling_winnings == SKIP
  @gambling_losses = gambling_losses unless gambling_losses == SKIP
  @section751b = section751b unless section751b == SKIP
  unless specially_allocated_ordinary == SKIP
    @specially_allocated_ordinary =
      specially_allocated_ordinary
  end
  unless specially_allocated_short_term == SKIP
    @specially_allocated_short_term =
      specially_allocated_short_term
  end
  unless specially_allocated_long_term == SKIP
    @specially_allocated_long_term =
      specially_allocated_long_term
  end
  unless specially_allocated28_percent == SKIP
    @specially_allocated28_percent =
      specially_allocated28_percent
  end
  @additional_properties = additional_properties
end

Instance Attribute Details

#gambling_lossesFloat

Gambling losses included in 1065 K-1 box 11 code F or 1120-S K-1 box 10 code I

Returns:

  • (Float)


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

def gambling_losses
  @gambling_losses
end

#gambling_winningsFloat

Gambling winnings included in 1065 K-1 box 11 code F or 1120-S K-1 box 10 code I

Returns:

  • (Float)


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

def gambling_winnings
  @gambling_winnings
end

#recoveriesFloat

Recoveries of tax benefit items

Returns:

  • (Float)


29
30
31
# File 'lib/fdx_v660_api/models/k1_other_income1.rb', line 29

def recoveries
  @recoveries
end

#remic_excess_inclusionFloat

Real Estate Mortgage Investment Conduit (REMIC) excess inclusion included in 1065 K-1 box 11 code A or 1120-S K-1 box 10 code A

Returns:

  • (Float)


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

def remic_excess_inclusion
  @remic_excess_inclusion
end

#remic_section212Float

Real Estate Mortgage Investment Conduit (REMIC) section 212 expenses included in 1065 K-1 box 11 code A or 1120-S K-1 box 10 code A

Returns:

  • (Float)


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

def remic_section212
  @remic_section212
end

#remic_taxable_incomeFloat

Real Estate Mortgage Investment Conduit (REMIC) taxable income (loss) included in 1065 K-1 box 11 code A or 1120-S K-1 box 10 code A

Returns:

  • (Float)


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

def remic_taxable_income
  @remic_taxable_income
end

#section751bFloat

Section 751(b) receivables, inventory

Returns:

  • (Float)


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

def section751b
  @section751b
end

#specially_allocated28_percentFloat

Specially allocated 28% rate included in net long-term gain (loss) included in 1065 K-1 box 11 code F or 1120-S K-1 box 10 code I

Returns:

  • (Float)


63
64
65
# File 'lib/fdx_v660_api/models/k1_other_income1.rb', line 63

def specially_allocated28_percent
  @specially_allocated28_percent
end

#specially_allocated_long_termFloat

Specially allocated net long-term capital gain (loss) included in 1065 K-1 box 11 code F or 1120-S K-1 box 10 code I

Returns:

  • (Float)


58
59
60
# File 'lib/fdx_v660_api/models/k1_other_income1.rb', line 58

def specially_allocated_long_term
  @specially_allocated_long_term
end

#specially_allocated_ordinaryFloat

Specially allocated ordinary gain (loss) included in 1065 K-1 box 11 code F or 1120-S K-1 box 10 code I

Returns:

  • (Float)


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

def specially_allocated_ordinary
  @specially_allocated_ordinary
end

#specially_allocated_short_termFloat

Specially allocated net short-term capital gain (loss) included in 1065 K-1 box 11 code F or 1120-S K-1 box 10 code I

Returns:

  • (Float)


53
54
55
# File 'lib/fdx_v660_api/models/k1_other_income1.rb', line 53

def specially_allocated_short_term
  @specially_allocated_short_term
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/fdx_v660_api/models/k1_other_income1.rb', line 142

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  remic_taxable_income =
    hash.key?('remicTaxableIncome') ? hash['remicTaxableIncome'] : SKIP
  remic_excess_inclusion =
    hash.key?('remicExcessInclusion') ? hash['remicExcessInclusion'] : SKIP
  remic_section212 =
    hash.key?('remicSection212') ? hash['remicSection212'] : SKIP
  recoveries = hash.key?('recoveries') ? hash['recoveries'] : SKIP
  gambling_winnings =
    hash.key?('gamblingWinnings') ? hash['gamblingWinnings'] : SKIP
  gambling_losses =
    hash.key?('gamblingLosses') ? hash['gamblingLosses'] : SKIP
  section751b = hash.key?('section751b') ? hash['section751b'] : SKIP
  specially_allocated_ordinary =
    hash.key?('speciallyAllocatedOrdinary') ? hash['speciallyAllocatedOrdinary'] : SKIP
  specially_allocated_short_term =
    hash.key?('speciallyAllocatedShortTerm') ? hash['speciallyAllocatedShortTerm'] : SKIP
  specially_allocated_long_term =
    hash.key?('speciallyAllocatedLongTerm') ? hash['speciallyAllocatedLongTerm'] : SKIP
  specially_allocated28_percent =
    hash.key?('speciallyAllocated28Percent') ? hash['speciallyAllocated28Percent'] : 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.
  K1OtherIncome1.new(remic_taxable_income: remic_taxable_income,
                     remic_excess_inclusion: remic_excess_inclusion,
                     remic_section212: remic_section212,
                     recoveries: recoveries,
                     gambling_winnings: gambling_winnings,
                     gambling_losses: gambling_losses,
                     section751b: section751b,
                     specially_allocated_ordinary: specially_allocated_ordinary,
                     specially_allocated_short_term: specially_allocated_short_term,
                     specially_allocated_long_term: specially_allocated_long_term,
                     specially_allocated28_percent: specially_allocated28_percent,
                     additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/fdx_v660_api/models/k1_other_income1.rb', line 66

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['remic_taxable_income'] = 'remicTaxableIncome'
  @_hash['remic_excess_inclusion'] = 'remicExcessInclusion'
  @_hash['remic_section212'] = 'remicSection212'
  @_hash['recoveries'] = 'recoveries'
  @_hash['gambling_winnings'] = 'gamblingWinnings'
  @_hash['gambling_losses'] = 'gamblingLosses'
  @_hash['section751b'] = 'section751b'
  @_hash['specially_allocated_ordinary'] = 'speciallyAllocatedOrdinary'
  @_hash['specially_allocated_short_term'] = 'speciallyAllocatedShortTerm'
  @_hash['specially_allocated_long_term'] = 'speciallyAllocatedLongTerm'
  @_hash['specially_allocated28_percent'] = 'speciallyAllocated28Percent'
  @_hash
end

.nullablesObject

An array for nullable fields



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

def self.nullables
  []
end

.optionalsObject

An array for optional fields



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/fdx_v660_api/models/k1_other_income1.rb', line 83

def self.optionals
  %w[
    remic_taxable_income
    remic_excess_inclusion
    remic_section212
    recoveries
    gambling_winnings
    gambling_losses
    section751b
    specially_allocated_ordinary
    specially_allocated_short_term
    specially_allocated_long_term
    specially_allocated28_percent
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/fdx_v660_api/models/k1_other_income1.rb', line 203

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} remic_taxable_income: #{@remic_taxable_income.inspect},"\
  " remic_excess_inclusion: #{@remic_excess_inclusion.inspect}, remic_section212:"\
  " #{@remic_section212.inspect}, recoveries: #{@recoveries.inspect}, gambling_winnings:"\
  " #{@gambling_winnings.inspect}, gambling_losses: #{@gambling_losses.inspect}, section751b:"\
  " #{@section751b.inspect}, specially_allocated_ordinary:"\
  " #{@specially_allocated_ordinary.inspect}, specially_allocated_short_term:"\
  " #{@specially_allocated_short_term.inspect}, specially_allocated_long_term:"\
  " #{@specially_allocated_long_term.inspect}, specially_allocated28_percent:"\
  " #{@specially_allocated28_percent.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



190
191
192
193
194
195
196
197
198
199
200
# File 'lib/fdx_v660_api/models/k1_other_income1.rb', line 190

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} remic_taxable_income: #{@remic_taxable_income}, remic_excess_inclusion:"\
  " #{@remic_excess_inclusion}, remic_section212: #{@remic_section212}, recoveries:"\
  " #{@recoveries}, gambling_winnings: #{@gambling_winnings}, gambling_losses:"\
  " #{@gambling_losses}, section751b: #{@section751b}, specially_allocated_ordinary:"\
  " #{@specially_allocated_ordinary}, specially_allocated_short_term:"\
  " #{@specially_allocated_short_term}, specially_allocated_long_term:"\
  " #{@specially_allocated_long_term}, specially_allocated28_percent:"\
  " #{@specially_allocated28_percent}, additional_properties: #{@additional_properties}>"
end