Class: FdxV660Api::K1StatementC2
- Defined in:
- lib/fdx_v660_api/models/k1_statement_c2.rb
Overview
Form 1120-S Schedule K-1 Statement C, Qualified Business Income (QBI) Pass-Through Entity Reporting, Patrons of Specified Agricultural and Horticultural Coooperatives
Instance Attribute Summary collapse
-
#qbi_items ⇒ Array[K1StatementCQualifiedBusinessIncomeQbiPartnerSpecificItems]
Qualified Business Income (QBI) items allocable to qualified payments subject to partner-specific determinations.
-
#section199_ag_deduction ⇒ Float
Section 199A(g) deduction.
-
#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, section199_ag_deduction: SKIP, self_employed_health_insurance: SKIP, self_employed_retirement: SKIP, additional_properties: nil) ⇒ K1StatementC2
constructor
A new instance of K1StatementC2.
-
#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, section199_ag_deduction: SKIP, self_employed_health_insurance: SKIP, self_employed_retirement: SKIP, additional_properties: nil) ⇒ K1StatementC2
Returns a new instance of K1StatementC2.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/fdx_v660_api/models/k1_statement_c2.rb', line 58 def initialize(qbi_items: SKIP, section199_ag_deduction: 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 @section199_ag_deduction = section199_ag_deduction unless section199_ag_deduction == 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[K1StatementCQualifiedBusinessIncomeQbiPartnerSpecificItems]
Qualified Business Income (QBI) items allocable to qualified payments subject to partner-specific determinations
17 18 19 |
# File 'lib/fdx_v660_api/models/k1_statement_c2.rb', line 17 def qbi_items @qbi_items end |
#section199_ag_deduction ⇒ Float
Section 199A(g) deduction
21 22 23 |
# File 'lib/fdx_v660_api/models/k1_statement_c2.rb', line 21 def section199_ag_deduction @section199_ag_deduction 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_c2.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_c2.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 109 |
# File 'lib/fdx_v660_api/models/k1_statement_c2.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 << (K1StatementCQualifiedBusinessIncomeQbiPartnerSpecificItems.from_hash(structure) if structure) end end qbi_items = SKIP unless hash.key?('qbiItems') section199_ag_deduction = hash.key?('section199AgDeduction') ? hash['section199AgDeduction'] : 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. K1StatementC2.new(qbi_items: qbi_items, section199_ag_deduction: section199_ag_deduction, 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_c2.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['qbi_items'] = 'qbiItems' @_hash['section199_ag_deduction'] = 'section199AgDeduction' @_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_c2.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_c2.rb', line 44 def self.optionals %w[ qbi_items section199_ag_deduction self_employed_health_insurance self_employed_retirement ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
121 122 123 124 125 126 127 |
# File 'lib/fdx_v660_api/models/k1_statement_c2.rb', line 121 def inspect class_name = self.class.name.split('::').last "<#{class_name} qbi_items: #{@qbi_items.inspect}, section199_ag_deduction:"\ " #{@section199_ag_deduction.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.
112 113 114 115 116 117 118 |
# File 'lib/fdx_v660_api/models/k1_statement_c2.rb', line 112 def to_s class_name = self.class.name.split('::').last "<#{class_name} qbi_items: #{@qbi_items}, section199_ag_deduction:"\ " #{@section199_ag_deduction}, self_employed_health_insurance:"\ " #{@self_employed_health_insurance}, self_employed_retirement:"\ " #{@self_employed_retirement}, additional_properties: #{@additional_properties}>" end |