Class: FdxV660Api::K1InterestIncome
- Defined in:
- lib/fdx_v660_api/models/k1_interest_income.rb
Overview
Form 1065 and 1120-S Schedule K-1 supplemental interest income information
Instance Attribute Summary collapse
-
#private_activity_bond_interest ⇒ Float
Private activity bond interest.
-
#tax_exempt_state_interest ⇒ Float
Portion of municipal bond interest income which is tax exempt from taxpayer's State.
-
#us_treasury_dividend ⇒ Float
Portion of dividend income from US Treasury obligations.
-
#us_treasury_interest ⇒ Float
Portion of interest income from US Treasury obligations.
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(us_treasury_interest: SKIP, us_treasury_dividend: SKIP, tax_exempt_state_interest: SKIP, private_activity_bond_interest: SKIP, additional_properties: nil) ⇒ K1InterestIncome
constructor
A new instance of K1InterestIncome.
-
#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(us_treasury_interest: SKIP, us_treasury_dividend: SKIP, tax_exempt_state_interest: SKIP, private_activity_bond_interest: SKIP, additional_properties: nil) ⇒ K1InterestIncome
Returns a new instance of K1InterestIncome.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/fdx_v660_api/models/k1_interest_income.rb', line 54 def initialize(us_treasury_interest: SKIP, us_treasury_dividend: SKIP, tax_exempt_state_interest: SKIP, private_activity_bond_interest: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @us_treasury_interest = us_treasury_interest unless us_treasury_interest == SKIP @us_treasury_dividend = us_treasury_dividend unless us_treasury_dividend == SKIP unless tax_exempt_state_interest == SKIP @tax_exempt_state_interest = tax_exempt_state_interest end unless private_activity_bond_interest == SKIP @private_activity_bond_interest = private_activity_bond_interest end @additional_properties = additional_properties end |
Instance Attribute Details
#private_activity_bond_interest ⇒ Float
Private activity bond interest
27 28 29 |
# File 'lib/fdx_v660_api/models/k1_interest_income.rb', line 27 def private_activity_bond_interest @private_activity_bond_interest end |
#tax_exempt_state_interest ⇒ Float
Portion of municipal bond interest income which is tax exempt from taxpayer's State
23 24 25 |
# File 'lib/fdx_v660_api/models/k1_interest_income.rb', line 23 def tax_exempt_state_interest @tax_exempt_state_interest end |
#us_treasury_dividend ⇒ Float
Portion of dividend income from US Treasury obligations
18 19 20 |
# File 'lib/fdx_v660_api/models/k1_interest_income.rb', line 18 def us_treasury_dividend @us_treasury_dividend end |
#us_treasury_interest ⇒ Float
Portion of interest income from US Treasury obligations
14 15 16 |
# File 'lib/fdx_v660_api/models/k1_interest_income.rb', line 14 def us_treasury_interest @us_treasury_interest 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 |
# File 'lib/fdx_v660_api/models/k1_interest_income.rb', line 75 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. us_treasury_interest = hash.key?('usTreasuryInterest') ? hash['usTreasuryInterest'] : SKIP us_treasury_dividend = hash.key?('usTreasuryDividend') ? hash['usTreasuryDividend'] : SKIP tax_exempt_state_interest = hash.key?('taxExemptStateInterest') ? hash['taxExemptStateInterest'] : SKIP private_activity_bond_interest = hash.key?('privateActivityBondInterest') ? hash['privateActivityBondInterest'] : 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. K1InterestIncome.new(us_treasury_interest: us_treasury_interest, us_treasury_dividend: us_treasury_dividend, tax_exempt_state_interest: tax_exempt_state_interest, private_activity_bond_interest: private_activity_bond_interest, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 37 |
# File 'lib/fdx_v660_api/models/k1_interest_income.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['us_treasury_interest'] = 'usTreasuryInterest' @_hash['us_treasury_dividend'] = 'usTreasuryDividend' @_hash['tax_exempt_state_interest'] = 'taxExemptStateInterest' @_hash['private_activity_bond_interest'] = 'privateActivityBondInterest' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/fdx_v660_api/models/k1_interest_income.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 47 |
# File 'lib/fdx_v660_api/models/k1_interest_income.rb', line 40 def self.optionals %w[ us_treasury_interest us_treasury_dividend tax_exempt_state_interest private_activity_bond_interest ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
113 114 115 116 117 118 119 120 |
# File 'lib/fdx_v660_api/models/k1_interest_income.rb', line 113 def inspect class_name = self.class.name.split('::').last "<#{class_name} us_treasury_interest: #{@us_treasury_interest.inspect},"\ " us_treasury_dividend: #{@us_treasury_dividend.inspect}, tax_exempt_state_interest:"\ " #{@tax_exempt_state_interest.inspect}, private_activity_bond_interest:"\ " #{@private_activity_bond_interest.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
104 105 106 107 108 109 110 |
# File 'lib/fdx_v660_api/models/k1_interest_income.rb', line 104 def to_s class_name = self.class.name.split('::').last "<#{class_name} us_treasury_interest: #{@us_treasury_interest}, us_treasury_dividend:"\ " #{@us_treasury_dividend}, tax_exempt_state_interest: #{@tax_exempt_state_interest},"\ " private_activity_bond_interest: #{@private_activity_bond_interest}, additional_properties:"\ " #{@additional_properties}>" end |