Class: FdxV660Api::K1AlternativeMinimumTaxDrilling3

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/fdx_v660_api/models/k1_alternative_minimum_tax_drilling3.rb

Overview

Oil and gas amounts included in 1065 K-1 box 17 or 1120-S K-1 box 15

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(gross_income: SKIP, deductions: SKIP, excess_idc: SKIP, excess_depletion: SKIP, additional_properties: nil) ⇒ K1AlternativeMinimumTaxDrilling3

Returns a new instance of K1AlternativeMinimumTaxDrilling3.



57
58
59
60
61
62
63
64
65
66
67
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax_drilling3.rb', line 57

def initialize(gross_income: SKIP, deductions: SKIP, excess_idc: SKIP,
               excess_depletion: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @gross_income = gross_income unless gross_income == SKIP
  @deductions = deductions unless deductions == SKIP
  @excess_idc = excess_idc unless excess_idc == SKIP
  @excess_depletion = excess_depletion unless excess_depletion == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#deductionsFloat

Oil and gas or Geothermal deductions included in 1065 K-1 box 17 or 1120-S K-1 box 15

Returns:

  • (Float)


20
21
22
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax_drilling3.rb', line 20

def deductions
  @deductions
end

#excess_depletionFloat

Oil and gas excess depletion included in 1065 K-1 box 17 or 1120-S K-1 box 15

Returns:

  • (Float)


30
31
32
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax_drilling3.rb', line 30

def excess_depletion
  @excess_depletion
end

#excess_idcFloat

Oil and gas or Geothermal excess Intangible Drilling Costs (IDC) included in 1065 K-1 box 17 or 1120-S K-1 box 15

Returns:

  • (Float)


25
26
27
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax_drilling3.rb', line 25

def excess_idc
  @excess_idc
end

#gross_incomeFloat

Oil and gas or Geothermal gross income included in 1065 K-1 box 17 or 1120-S K-1 box 15

Returns:

  • (Float)


15
16
17
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax_drilling3.rb', line 15

def gross_income
  @gross_income
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax_drilling3.rb', line 70

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  gross_income = hash.key?('grossIncome') ? hash['grossIncome'] : SKIP
  deductions = hash.key?('deductions') ? hash['deductions'] : SKIP
  excess_idc = hash.key?('excessIdc') ? hash['excessIdc'] : SKIP
  excess_depletion =
    hash.key?('excessDepletion') ? hash['excessDepletion'] : 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.
  K1AlternativeMinimumTaxDrilling3.new(gross_income: gross_income,
                                       deductions: deductions,
                                       excess_idc: excess_idc,
                                       excess_depletion: excess_depletion,
                                       additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



33
34
35
36
37
38
39
40
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax_drilling3.rb', line 33

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['gross_income'] = 'grossIncome'
  @_hash['deductions'] = 'deductions'
  @_hash['excess_idc'] = 'excessIdc'
  @_hash['excess_depletion'] = 'excessDepletion'
  @_hash
end

.nullablesObject

An array for nullable fields



53
54
55
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax_drilling3.rb', line 53

def self.nullables
  []
end

.optionalsObject

An array for optional fields



43
44
45
46
47
48
49
50
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax_drilling3.rb', line 43

def self.optionals
  %w[
    gross_income
    deductions
    excess_idc
    excess_depletion
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



104
105
106
107
108
109
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax_drilling3.rb', line 104

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} gross_income: #{@gross_income.inspect}, deductions: #{@deductions.inspect},"\
  " excess_idc: #{@excess_idc.inspect}, excess_depletion: #{@excess_depletion.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



96
97
98
99
100
101
# File 'lib/fdx_v660_api/models/k1_alternative_minimum_tax_drilling3.rb', line 96

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} gross_income: #{@gross_income}, deductions: #{@deductions}, excess_idc:"\
  " #{@excess_idc}, excess_depletion: #{@excess_depletion}, additional_properties:"\
  " #{@additional_properties}>"
end