Class: FdxV660Api::K1StatementA
- Defined in:
- lib/fdx_v660_api/models/k1_statement_a.rb
Overview
Form 1065 and 1120-S Schedule K-1 Statement A, Qualified Business Income (QBI) Pass-Through Entity Reporting. Partnership and Partner information for Statement A is found on the Schedule K-1
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) ⇒ K1StatementA
constructor
A new instance of K1StatementA.
-
#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) ⇒ K1StatementA
Returns a new instance of K1StatementA.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/fdx_v660_api/models/k1_statement_a.rb', line 58 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
17 18 19 |
# File 'lib/fdx_v660_api/models/k1_statement_a.rb', line 17 def qbi_items @qbi_items end |
#reit_dividends ⇒ Float
Qualified Real Estate Investment Trust (REIT) dividends
21 22 23 |
# File 'lib/fdx_v660_api/models/k1_statement_a.rb', line 21 def reit_dividends @reit_dividends end |
#self_employed_health_insurance ⇒ Float
Self-employed health insurance deduction allocable to Qualified Business Income (QBI)
26 27 28 |
# File 'lib/fdx_v660_api/models/k1_statement_a.rb', line 26 def self_employed_health_insurance @self_employed_health_insurance end |
#self_employed_retirement ⇒ Float
Self-employed retirement deduction allocable to Qualified Business Income (QBI)
31 32 33 |
# File 'lib/fdx_v660_api/models/k1_statement_a.rb', line 31 def self_employed_retirement @self_employed_retirement end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 108 |
# File 'lib/fdx_v660_api/models/k1_statement_a.rb', line 75 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. K1StatementA.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.
34 35 36 37 38 39 40 41 |
# File 'lib/fdx_v660_api/models/k1_statement_a.rb', line 34 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
54 55 56 |
# File 'lib/fdx_v660_api/models/k1_statement_a.rb', line 54 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 |
# File 'lib/fdx_v660_api/models/k1_statement_a.rb', line 44 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.
120 121 122 123 124 125 126 |
# File 'lib/fdx_v660_api/models/k1_statement_a.rb', line 120 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.
111 112 113 114 115 116 117 |
# File 'lib/fdx_v660_api/models/k1_statement_a.rb', line 111 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 |