Class: FdxV660Api::K1OtherDeductions1
- Defined in:
- lib/fdx_v660_api/models/k1_other_deductions1.rb
Overview
Schedule K-1 Supplemental Other Deduction Information
Instance Attribute Summary collapse
-
#miscellaneous ⇒ Float
Other miscellaneous deductions included in 1065 K-1 box 13 or 1120-S K-1 box 12.
-
#plan_type ⇒ RetirementPlanType2
Retirement plan type for 1065 K-1 box 13 or 1120-S K-1 box 12.
-
#retirement_plan_payments ⇒ Float
Retirement plan payments included in 1065 K-1 box 13 or 1120-S K-1 box 12.
-
#taxes ⇒ Float
Other taxes included in 1065 K-1 box 13 or 1120-S K-1 box 12.
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(taxes: SKIP, miscellaneous: SKIP, retirement_plan_payments: SKIP, plan_type: SKIP, additional_properties: nil) ⇒ K1OtherDeductions1
constructor
A new instance of K1OtherDeductions1.
-
#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(taxes: SKIP, miscellaneous: SKIP, retirement_plan_payments: SKIP, plan_type: SKIP, additional_properties: nil) ⇒ K1OtherDeductions1
Returns a new instance of K1OtherDeductions1.
54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/fdx_v660_api/models/k1_other_deductions1.rb', line 54 def initialize(taxes: SKIP, miscellaneous: SKIP, retirement_plan_payments: SKIP, plan_type: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @taxes = taxes unless taxes == SKIP @miscellaneous = miscellaneous unless miscellaneous == SKIP @retirement_plan_payments = retirement_plan_payments unless retirement_plan_payments == SKIP @plan_type = plan_type unless plan_type == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#miscellaneous ⇒ Float
Other miscellaneous deductions included in 1065 K-1 box 13 or 1120-S K-1 box 12
19 20 21 |
# File 'lib/fdx_v660_api/models/k1_other_deductions1.rb', line 19 def miscellaneous @miscellaneous end |
#plan_type ⇒ RetirementPlanType2
Retirement plan type for 1065 K-1 box 13 or 1120-S K-1 box 12
27 28 29 |
# File 'lib/fdx_v660_api/models/k1_other_deductions1.rb', line 27 def plan_type @plan_type end |
#retirement_plan_payments ⇒ Float
Retirement plan payments included in 1065 K-1 box 13 or 1120-S K-1 box 12
23 24 25 |
# File 'lib/fdx_v660_api/models/k1_other_deductions1.rb', line 23 def retirement_plan_payments @retirement_plan_payments end |
#taxes ⇒ Float
Other taxes included in 1065 K-1 box 13 or 1120-S K-1 box 12
14 15 16 |
# File 'lib/fdx_v660_api/models/k1_other_deductions1.rb', line 14 def taxes @taxes end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/fdx_v660_api/models/k1_other_deductions1.rb', line 68 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. taxes = hash.key?('taxes') ? hash['taxes'] : SKIP miscellaneous = hash.key?('miscellaneous') ? hash['miscellaneous'] : SKIP retirement_plan_payments = hash.key?('retirementPlanPayments') ? hash['retirementPlanPayments'] : SKIP plan_type = hash.key?('planType') ? hash['planType'] : 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. K1OtherDeductions1.new(taxes: taxes, miscellaneous: miscellaneous, retirement_plan_payments: retirement_plan_payments, plan_type: plan_type, 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_other_deductions1.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['taxes'] = 'taxes' @_hash['miscellaneous'] = 'miscellaneous' @_hash['retirement_plan_payments'] = 'retirementPlanPayments' @_hash['plan_type'] = 'planType' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/fdx_v660_api/models/k1_other_deductions1.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_other_deductions1.rb', line 40 def self.optionals %w[ taxes miscellaneous retirement_plan_payments plan_type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
102 103 104 105 106 107 |
# File 'lib/fdx_v660_api/models/k1_other_deductions1.rb', line 102 def inspect class_name = self.class.name.split('::').last "<#{class_name} taxes: #{@taxes.inspect}, miscellaneous: #{@miscellaneous.inspect},"\ " retirement_plan_payments: #{@retirement_plan_payments.inspect}, plan_type:"\ " #{@plan_type.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
94 95 96 97 98 99 |
# File 'lib/fdx_v660_api/models/k1_other_deductions1.rb', line 94 def to_s class_name = self.class.name.split('::').last "<#{class_name} taxes: #{@taxes}, miscellaneous: #{@miscellaneous},"\ " retirement_plan_payments: #{@retirement_plan_payments}, plan_type: #{@plan_type},"\ " additional_properties: #{@additional_properties}>" end |