Class: FdxV660Api::K1StatementA2
- Defined in:
- lib/fdx_v660_api/models/k1_statement_a2.rb
Overview
Form 1120-S Schedule K-1 Statement A, Qualified Business Income (QBI) Pass-Through Entity Reporting
Instance Attribute Summary collapse
-
#qbi_items ⇒ Array[K1StatementAQualifiedBusinessIncomeQbiPartnerSpecificItems]
Qualified Business Income (QBI) or qualified Publicly Traded Partnership (PTP) items subject to partner-specific determinations.
-
#reit_dividends ⇒ Float
Qualified Real Estate Investment Trust (REIT) dividends.
-
#self_employed_health_insurance ⇒ Float
Self-employed health insurance deduction allocable to Qualified Business Income (QBI).
-
#self_employed_retirement ⇒ Float
Self-employed retirement deduction allocable to Qualified Business Income (QBI).
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(qbi_items: SKIP, reit_dividends: SKIP, self_employed_health_insurance: SKIP, self_employed_retirement: SKIP, additional_properties: nil) ⇒ K1StatementA2
constructor
A new instance of K1StatementA2.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(qbi_items: SKIP, reit_dividends: SKIP, self_employed_health_insurance: SKIP, self_employed_retirement: SKIP, additional_properties: nil) ⇒ K1StatementA2
Returns a new instance of K1StatementA2.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/fdx_v660_api/models/k1_statement_a2.rb', line 57 def initialize(qbi_items: SKIP, reit_dividends: SKIP, self_employed_health_insurance: SKIP, self_employed_retirement: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @qbi_items = qbi_items unless qbi_items == SKIP @reit_dividends = reit_dividends unless reit_dividends == SKIP unless self_employed_health_insurance == SKIP @self_employed_health_insurance = self_employed_health_insurance end @self_employed_retirement = self_employed_retirement unless self_employed_retirement == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#qbi_items ⇒ Array[K1StatementAQualifiedBusinessIncomeQbiPartnerSpecificItems]
Qualified Business Income (QBI) or qualified Publicly Traded Partnership (PTP) items subject to partner-specific determinations
16 17 18 |
# File 'lib/fdx_v660_api/models/k1_statement_a2.rb', line 16 def qbi_items @qbi_items end |
#reit_dividends ⇒ Float
Qualified Real Estate Investment Trust (REIT) dividends
20 21 22 |
# File 'lib/fdx_v660_api/models/k1_statement_a2.rb', line 20 def reit_dividends @reit_dividends end |
#self_employed_health_insurance ⇒ Float
Self-employed health insurance deduction allocable to Qualified Business Income (QBI)
25 26 27 |
# File 'lib/fdx_v660_api/models/k1_statement_a2.rb', line 25 def self_employed_health_insurance @self_employed_health_insurance end |
#self_employed_retirement ⇒ Float
Self-employed retirement deduction allocable to Qualified Business Income (QBI)
30 31 32 |
# File 'lib/fdx_v660_api/models/k1_statement_a2.rb', line 30 def self_employed_retirement @self_employed_retirement end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/fdx_v660_api/models/k1_statement_a2.rb', line 74 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it qbi_items = nil unless hash['qbiItems'].nil? qbi_items = [] hash['qbiItems'].each do |structure| qbi_items << (K1StatementAQualifiedBusinessIncomeQbiPartnerSpecificItems.from_hash(structure) if structure) end end qbi_items = SKIP unless hash.key?('qbiItems') reit_dividends = hash.key?('reitDividends') ? hash['reitDividends'] : SKIP self_employed_health_insurance = hash.key?('selfEmployedHealthInsurance') ? hash['selfEmployedHealthInsurance'] : SKIP self_employed_retirement = hash.key?('selfEmployedRetirement') ? hash['selfEmployedRetirement'] : 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. K1StatementA2.new(qbi_items: qbi_items, reit_dividends: reit_dividends, self_employed_health_insurance: self_employed_health_insurance, self_employed_retirement: self_employed_retirement, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 |
# File 'lib/fdx_v660_api/models/k1_statement_a2.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['qbi_items'] = 'qbiItems' @_hash['reit_dividends'] = 'reitDividends' @_hash['self_employed_health_insurance'] = 'selfEmployedHealthInsurance' @_hash['self_employed_retirement'] = 'selfEmployedRetirement' @_hash end |
.nullables ⇒ Object
An array for nullable fields
53 54 55 |
# File 'lib/fdx_v660_api/models/k1_statement_a2.rb', line 53 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
43 44 45 46 47 48 49 50 |
# File 'lib/fdx_v660_api/models/k1_statement_a2.rb', line 43 def self.optionals %w[ qbi_items reit_dividends self_employed_health_insurance self_employed_retirement ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
119 120 121 122 123 124 125 |
# File 'lib/fdx_v660_api/models/k1_statement_a2.rb', line 119 def inspect class_name = self.class.name.split('::').last "<#{class_name} qbi_items: #{@qbi_items.inspect}, reit_dividends:"\ " #{@reit_dividends.inspect}, self_employed_health_insurance:"\ " #{@self_employed_health_insurance.inspect}, self_employed_retirement:"\ " #{@self_employed_retirement.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
110 111 112 113 114 115 116 |
# File 'lib/fdx_v660_api/models/k1_statement_a2.rb', line 110 def to_s class_name = self.class.name.split('::').last "<#{class_name} qbi_items: #{@qbi_items}, reit_dividends: #{@reit_dividends},"\ " self_employed_health_insurance: #{@self_employed_health_insurance},"\ " self_employed_retirement: #{@self_employed_retirement}, additional_properties:"\ " #{@additional_properties}>" end |