Class: FdxV660Api::K1AlternativeMinimumTax1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::K1AlternativeMinimumTax1
- Defined in:
- lib/fdx_v660_api/models/k1_alternative_minimum_tax1.rb
Overview
Schedule K-1 Supplemental Alternative Minimum Tax Information
Instance Attribute Summary collapse
-
#geothermal ⇒ K1AlternativeMinimumTaxDrilling1
Geothermal amounts included in 1065 K-1 box 17 or 1120-S K-1 box 15.
-
#leased_property_depreciation ⇒ Float
Leased personal property - accelerated depreciation pre-1987 amounts included in 1065 K-1 box 17 or 1120-S K-1 box 15.
-
#oil_and_gas ⇒ K1AlternativeMinimumTaxDrilling3
Oil and gas amounts included in 1065 K-1 box 17 or 1120-S K-1 box 15.
-
#real_property_depreciation ⇒ Float
Real property - accelerated depreciation pre-1987 amounts included in 1065 K-1 box 17 or 1120-S K-1 box 15.
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(leased_property_depreciation: SKIP, real_property_depreciation: SKIP, oil_and_gas: SKIP, geothermal: SKIP, additional_properties: nil) ⇒ K1AlternativeMinimumTax1
constructor
A new instance of K1AlternativeMinimumTax1.
-
#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(leased_property_depreciation: SKIP, real_property_depreciation: SKIP, oil_and_gas: SKIP, geothermal: SKIP, additional_properties: nil) ⇒ K1AlternativeMinimumTax1
Returns a new instance of K1AlternativeMinimumTax1.
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_alternative_minimum_tax1.rb', line 55 def initialize(leased_property_depreciation: SKIP, real_property_depreciation: SKIP, oil_and_gas: SKIP, geothermal: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? unless leased_property_depreciation == SKIP @leased_property_depreciation = leased_property_depreciation end unless real_property_depreciation == SKIP @real_property_depreciation = real_property_depreciation end @oil_and_gas = oil_and_gas unless oil_and_gas == SKIP @geothermal = geothermal unless geothermal == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#geothermal ⇒ K1AlternativeMinimumTaxDrilling1
Geothermal amounts included in 1065 K-1 box 17 or 1120-S K-1 box 15
28 29 30 |
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax1.rb', line 28 def geothermal @geothermal end |
#leased_property_depreciation ⇒ Float
Leased personal property - accelerated depreciation pre-1987 amounts included in 1065 K-1 box 17 or 1120-S K-1 box 15
15 16 17 |
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax1.rb', line 15 def leased_property_depreciation @leased_property_depreciation end |
#oil_and_gas ⇒ K1AlternativeMinimumTaxDrilling3
Oil and gas amounts included in 1065 K-1 box 17 or 1120-S K-1 box 15
24 25 26 |
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax1.rb', line 24 def oil_and_gas @oil_and_gas end |
#real_property_depreciation ⇒ Float
Real property - accelerated depreciation pre-1987 amounts included in 1065 K-1 box 17 or 1120-S K-1 box 15
20 21 22 |
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax1.rb', line 20 def real_property_depreciation @real_property_depreciation 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_alternative_minimum_tax1.rb', line 75 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. leased_property_depreciation = hash.key?('leasedPropertyDepreciation') ? hash['leasedPropertyDepreciation'] : SKIP real_property_depreciation = hash.key?('realPropertyDepreciation') ? hash['realPropertyDepreciation'] : SKIP oil_and_gas = K1AlternativeMinimumTaxDrilling3.from_hash(hash['oilAndGas']) if hash['oilAndGas'] geothermal = K1AlternativeMinimumTaxDrilling1.from_hash(hash['geothermal']) if hash['geothermal'] # 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. K1AlternativeMinimumTax1.new(leased_property_depreciation: leased_property_depreciation, real_property_depreciation: real_property_depreciation, oil_and_gas: oil_and_gas, geothermal: geothermal, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
31 32 33 34 35 36 37 38 |
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax1.rb', line 31 def self.names @_hash = {} if @_hash.nil? @_hash['leased_property_depreciation'] = 'leasedPropertyDepreciation' @_hash['real_property_depreciation'] = 'realPropertyDepreciation' @_hash['oil_and_gas'] = 'oilAndGas' @_hash['geothermal'] = 'geothermal' @_hash end |
.nullables ⇒ Object
An array for nullable fields
51 52 53 |
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax1.rb', line 51 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
41 42 43 44 45 46 47 48 |
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax1.rb', line 41 def self.optionals %w[ leased_property_depreciation real_property_depreciation oil_and_gas geothermal ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
112 113 114 115 116 117 118 |
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax1.rb', line 112 def inspect class_name = self.class.name.split('::').last "<#{class_name} leased_property_depreciation: #{@leased_property_depreciation.inspect},"\ " real_property_depreciation: #{@real_property_depreciation.inspect}, oil_and_gas:"\ " #{@oil_and_gas.inspect}, geothermal: #{@geothermal.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
104 105 106 107 108 109 |
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax1.rb', line 104 def to_s class_name = self.class.name.split('::').last "<#{class_name} leased_property_depreciation: #{@leased_property_depreciation},"\ " real_property_depreciation: #{@real_property_depreciation}, oil_and_gas: #{@oil_and_gas},"\ " geothermal: #{@geothermal}, additional_properties: #{@additional_properties}>" end |