Class: FdxV660Api::K1Supplemental
- Defined in:
- lib/fdx_v660_api/models/k1_supplemental.rb
Overview
Supplemental Information for Form 1065 Schedule K-1 (Partnership) and Form 1120-S Schedule K-1 (S Corporation)
Instance Attribute Summary collapse
-
#alternative_minimum_tax ⇒ K1AlternativeMinimumTax1
Schedule K-1 Supplemental Alternative Minimum Tax Information.
-
#farm_activity ⇒ TrueClass | FalseClass
Self-employment is from a farm activity, for Form 1065 Schedule K-1 Box 14 with code A.
-
#foreign_partnership ⇒ TrueClass | FalseClass
Foreign partnership.
-
#interest_income ⇒ K1InterestIncome1
Schedule K-1 Supplemental Interest Income Information.
-
#other_deductions ⇒ K1OtherDeductions1
Schedule K-1 Supplemental Other Deduction Information.
-
#other_income ⇒ K1OtherIncome1
Schedule K-1 Supplemental Other Income Information.
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(foreign_partnership: SKIP, farm_activity: SKIP, other_income: SKIP, other_deductions: SKIP, alternative_minimum_tax: SKIP, interest_income: SKIP, additional_properties: nil) ⇒ K1Supplemental
constructor
A new instance of K1Supplemental.
-
#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(foreign_partnership: SKIP, farm_activity: SKIP, other_income: SKIP, other_deductions: SKIP, alternative_minimum_tax: SKIP, interest_income: SKIP, additional_properties: nil) ⇒ K1Supplemental
Returns a new instance of K1Supplemental.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/fdx_v660_api/models/k1_supplemental.rb', line 67 def initialize(foreign_partnership: SKIP, farm_activity: SKIP, other_income: SKIP, other_deductions: SKIP, alternative_minimum_tax: SKIP, interest_income: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @foreign_partnership = foreign_partnership unless foreign_partnership == SKIP @farm_activity = farm_activity unless farm_activity == SKIP @other_income = other_income unless other_income == SKIP @other_deductions = other_deductions unless other_deductions == SKIP @alternative_minimum_tax = alternative_minimum_tax unless alternative_minimum_tax == SKIP @interest_income = interest_income unless interest_income == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#alternative_minimum_tax ⇒ K1AlternativeMinimumTax1
Schedule K-1 Supplemental Alternative Minimum Tax Information
32 33 34 |
# File 'lib/fdx_v660_api/models/k1_supplemental.rb', line 32 def alternative_minimum_tax @alternative_minimum_tax end |
#farm_activity ⇒ TrueClass | FalseClass
Self-employment is from a farm activity, for Form 1065 Schedule K-1 Box 14 with code A
20 21 22 |
# File 'lib/fdx_v660_api/models/k1_supplemental.rb', line 20 def farm_activity @farm_activity end |
#foreign_partnership ⇒ TrueClass | FalseClass
Foreign partnership
15 16 17 |
# File 'lib/fdx_v660_api/models/k1_supplemental.rb', line 15 def foreign_partnership @foreign_partnership end |
#interest_income ⇒ K1InterestIncome1
Schedule K-1 Supplemental Interest Income Information
36 37 38 |
# File 'lib/fdx_v660_api/models/k1_supplemental.rb', line 36 def interest_income @interest_income end |
#other_deductions ⇒ K1OtherDeductions1
Schedule K-1 Supplemental Other Deduction Information
28 29 30 |
# File 'lib/fdx_v660_api/models/k1_supplemental.rb', line 28 def other_deductions @other_deductions end |
#other_income ⇒ K1OtherIncome1
Schedule K-1 Supplemental Other Income Information
24 25 26 |
# File 'lib/fdx_v660_api/models/k1_supplemental.rb', line 24 def other_income @other_income end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 110 111 112 113 114 |
# File 'lib/fdx_v660_api/models/k1_supplemental.rb', line 84 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. foreign_partnership = hash.key?('foreignPartnership') ? hash['foreignPartnership'] : SKIP farm_activity = hash.key?('farmActivity') ? hash['farmActivity'] : SKIP other_income = K1OtherIncome1.from_hash(hash['otherIncome']) if hash['otherIncome'] other_deductions = K1OtherDeductions1.from_hash(hash['otherDeductions']) if hash['otherDeductions'] alternative_minimum_tax = K1AlternativeMinimumTax1.from_hash(hash['alternativeMinimumTax']) if hash['alternativeMinimumTax'] interest_income = K1InterestIncome1.from_hash(hash['interestIncome']) if hash['interestIncome'] # 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. K1Supplemental.new(foreign_partnership: foreign_partnership, farm_activity: farm_activity, other_income: other_income, other_deductions: other_deductions, alternative_minimum_tax: alternative_minimum_tax, interest_income: interest_income, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/fdx_v660_api/models/k1_supplemental.rb', line 39 def self.names @_hash = {} if @_hash.nil? @_hash['foreign_partnership'] = 'foreignPartnership' @_hash['farm_activity'] = 'farmActivity' @_hash['other_income'] = 'otherIncome' @_hash['other_deductions'] = 'otherDeductions' @_hash['alternative_minimum_tax'] = 'alternativeMinimumTax' @_hash['interest_income'] = 'interestIncome' @_hash end |
.nullables ⇒ Object
An array for nullable fields
63 64 65 |
# File 'lib/fdx_v660_api/models/k1_supplemental.rb', line 63 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/fdx_v660_api/models/k1_supplemental.rb', line 51 def self.optionals %w[ foreign_partnership farm_activity other_income other_deductions alternative_minimum_tax interest_income ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
126 127 128 129 130 131 132 133 |
# File 'lib/fdx_v660_api/models/k1_supplemental.rb', line 126 def inspect class_name = self.class.name.split('::').last "<#{class_name} foreign_partnership: #{@foreign_partnership.inspect}, farm_activity:"\ " #{@farm_activity.inspect}, other_income: #{@other_income.inspect}, other_deductions:"\ " #{@other_deductions.inspect}, alternative_minimum_tax:"\ " #{@alternative_minimum_tax.inspect}, interest_income: #{@interest_income.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
117 118 119 120 121 122 123 |
# File 'lib/fdx_v660_api/models/k1_supplemental.rb', line 117 def to_s class_name = self.class.name.split('::').last "<#{class_name} foreign_partnership: #{@foreign_partnership}, farm_activity:"\ " #{@farm_activity}, other_income: #{@other_income}, other_deductions: #{@other_deductions},"\ " alternative_minimum_tax: #{@alternative_minimum_tax}, interest_income:"\ " #{@interest_income}, additional_properties: #{@additional_properties}>" end |