Class: FdxV660Api::K1StatementAQualifiedBusinessIncomeQbiPartnerSpecificItems

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

Overview

Form 1065 and 1120-S Schedule K-1 Statement A Qualified Business Income (QBI) or qualified Publicly Traded Partnership (PTP) items subject to partner-specific determinations

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(business_description: SKIP, publicly_traded_partnership: SKIP, aggregated: SKIP, specified_service_business: SKIP, ordinary_income: SKIP, rental_income: SKIP, royalty_income: SKIP, section1231_gain: SKIP, other_income: SKIP, section179_deduction: SKIP, other_deductions: SKIP, w2_wages: SKIP, qualified_property_ubia: SKIP, additional_properties: nil) ⇒ K1StatementAQualifiedBusinessIncomeQbiPartnerSpecificItems

Returns a new instance of K1StatementAQualifiedBusinessIncomeQbiPartnerSpecificItems.



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
140
141
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 110

def initialize(business_description: SKIP,
               publicly_traded_partnership: SKIP, aggregated: SKIP,
               specified_service_business: SKIP, ordinary_income: SKIP,
               rental_income: SKIP, royalty_income: SKIP,
               section1231_gain: SKIP, other_income: SKIP,
               section179_deduction: SKIP, other_deductions: SKIP,
               w2_wages: SKIP, qualified_property_ubia: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @business_description = business_description unless business_description == SKIP
  unless publicly_traded_partnership == SKIP
    @publicly_traded_partnership =
      publicly_traded_partnership
  end
  @aggregated = aggregated unless aggregated == SKIP
  unless specified_service_business == SKIP
    @specified_service_business =
      specified_service_business
  end
  @ordinary_income = ordinary_income unless ordinary_income == SKIP
  @rental_income = rental_income unless rental_income == SKIP
  @royalty_income = royalty_income unless royalty_income == SKIP
  @section1231_gain = section1231_gain unless section1231_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
  @w2_wages = w2_wages unless w2_wages == SKIP
  @qualified_property_ubia = qualified_property_ubia unless qualified_property_ubia == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#aggregatedTrueClass | FalseClass

Aggregated checkbox

Returns:

  • (TrueClass | FalseClass)


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

def aggregated
  @aggregated
end

#business_descriptionString

Business description

Returns:

  • (String)


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

def business_description
  @business_description
end

#ordinary_incomeFloat

Ordinary business income (loss)

Returns:

  • (Float)


32
33
34
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 32

def ordinary_income
  @ordinary_income
end

#other_deductionsFloat

Other deductions

Returns:

  • (Float)


56
57
58
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 56

def other_deductions
  @other_deductions
end

#other_incomeFloat

Other income (loss)

Returns:

  • (Float)


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

def other_income
  @other_income
end

#publicly_traded_partnershipTrueClass | FalseClass

Publicly Traded Partnership (PTP) checkbox

Returns:

  • (TrueClass | FalseClass)


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

def publicly_traded_partnership
  @publicly_traded_partnership
end

#qualified_property_ubiaFloat

Unadjusted Basis Immediately After Acquisition (UBIA) of qualified property

Returns:

  • (Float)


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

def qualified_property_ubia
  @qualified_property_ubia
end

#rental_incomeFloat

Rental income (loss)

Returns:

  • (Float)


36
37
38
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 36

def rental_income
  @rental_income
end

#royalty_incomeFloat

Royalty income (loss)

Returns:

  • (Float)


40
41
42
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 40

def royalty_income
  @royalty_income
end

#section1231_gainFloat

Section 1231 gain (loss)

Returns:

  • (Float)


44
45
46
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 44

def section1231_gain
  @section1231_gain
end

#section179_deductionFloat

Section 179 deduction

Returns:

  • (Float)


52
53
54
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 52

def section179_deduction
  @section179_deduction
end

#specified_service_businessTrueClass | FalseClass

Specified Service Trade or Business (SSTB) checkbox

Returns:

  • (TrueClass | FalseClass)


28
29
30
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 28

def specified_service_business
  @specified_service_business
end

#w2_wagesFloat

Section 199A wages paid

Returns:

  • (Float)


60
61
62
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 60

def w2_wages
  @w2_wages
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
188
189
190
191
192
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 144

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  business_description =
    hash.key?('businessDescription') ? hash['businessDescription'] : SKIP
  publicly_traded_partnership =
    hash.key?('publiclyTradedPartnership') ? hash['publiclyTradedPartnership'] : SKIP
  aggregated = hash.key?('aggregated') ? hash['aggregated'] : SKIP
  specified_service_business =
    hash.key?('specifiedServiceBusiness') ? hash['specifiedServiceBusiness'] : SKIP
  ordinary_income =
    hash.key?('ordinaryIncome') ? hash['ordinaryIncome'] : SKIP
  rental_income = hash.key?('rentalIncome') ? hash['rentalIncome'] : SKIP
  royalty_income = hash.key?('royaltyIncome') ? hash['royaltyIncome'] : SKIP
  section1231_gain =
    hash.key?('section1231Gain') ? hash['section1231Gain'] : SKIP
  other_income = hash.key?('otherIncome') ? hash['otherIncome'] : SKIP
  section179_deduction =
    hash.key?('section179Deduction') ? hash['section179Deduction'] : SKIP
  other_deductions =
    hash.key?('otherDeductions') ? hash['otherDeductions'] : SKIP
  w2_wages = hash.key?('w2Wages') ? hash['w2Wages'] : SKIP
  qualified_property_ubia =
    hash.key?('qualifiedPropertyUbia') ? hash['qualifiedPropertyUbia'] : 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.
  K1StatementAQualifiedBusinessIncomeQbiPartnerSpecificItems.new(business_description: business_description,
                                                                 publicly_traded_partnership: publicly_traded_partnership,
                                                                 aggregated: aggregated,
                                                                 specified_service_business: specified_service_business,
                                                                 ordinary_income: ordinary_income,
                                                                 rental_income: rental_income,
                                                                 royalty_income: royalty_income,
                                                                 section1231_gain: section1231_gain,
                                                                 other_income: other_income,
                                                                 section179_deduction: section179_deduction,
                                                                 other_deductions: other_deductions,
                                                                 w2_wages: w2_wages,
                                                                 qualified_property_ubia: qualified_property_ubia,
                                                                 additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 68

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['business_description'] = 'businessDescription'
  @_hash['publicly_traded_partnership'] = 'publiclyTradedPartnership'
  @_hash['aggregated'] = 'aggregated'
  @_hash['specified_service_business'] = 'specifiedServiceBusiness'
  @_hash['ordinary_income'] = 'ordinaryIncome'
  @_hash['rental_income'] = 'rentalIncome'
  @_hash['royalty_income'] = 'royaltyIncome'
  @_hash['section1231_gain'] = 'section1231Gain'
  @_hash['other_income'] = 'otherIncome'
  @_hash['section179_deduction'] = 'section179Deduction'
  @_hash['other_deductions'] = 'otherDeductions'
  @_hash['w2_wages'] = 'w2Wages'
  @_hash['qualified_property_ubia'] = 'qualifiedPropertyUbia'
  @_hash
end

.nullablesObject

An array for nullable fields



106
107
108
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 106

def self.nullables
  []
end

.optionalsObject

An array for optional fields



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 87

def self.optionals
  %w[
    business_description
    publicly_traded_partnership
    aggregated
    specified_service_business
    ordinary_income
    rental_income
    royalty_income
    section1231_gain
    other_income
    section179_deduction
    other_deductions
    w2_wages
    qualified_property_ubia
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 208

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} business_description: #{@business_description.inspect},"\
  " publicly_traded_partnership: #{@publicly_traded_partnership.inspect}, aggregated:"\
  " #{@aggregated.inspect}, specified_service_business:"\
  " #{@specified_service_business.inspect}, ordinary_income: #{@ordinary_income.inspect},"\
  " rental_income: #{@rental_income.inspect}, royalty_income: #{@royalty_income.inspect},"\
  " section1231_gain: #{@section1231_gain.inspect}, other_income: #{@other_income.inspect},"\
  " section179_deduction: #{@section179_deduction.inspect}, other_deductions:"\
  " #{@other_deductions.inspect}, w2_wages: #{@w2_wages.inspect}, qualified_property_ubia:"\
  " #{@qualified_property_ubia.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



195
196
197
198
199
200
201
202
203
204
205
# File 'lib/fdx_v660_api/models/k1_statement_a_qualified_business_income_qbi_partner_specific_items.rb', line 195

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} business_description: #{@business_description},"\
  " publicly_traded_partnership: #{@publicly_traded_partnership}, aggregated: #{@aggregated},"\
  " specified_service_business: #{@specified_service_business}, ordinary_income:"\
  " #{@ordinary_income}, rental_income: #{@rental_income}, royalty_income: #{@royalty_income},"\
  " section1231_gain: #{@section1231_gain}, other_income: #{@other_income},"\
  " section179_deduction: #{@section179_deduction}, other_deductions: #{@other_deductions},"\
  " w2_wages: #{@w2_wages}, qualified_property_ubia: #{@qualified_property_ubia},"\
  " additional_properties: #{@additional_properties}>"
end