Class: FdxV660Api::AnnuityDetailsEntity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::AnnuityDetailsEntity
- Defined in:
- lib/fdx_v660_api/models/annuity_details_entity.rb
Overview
The details of an annuity reported on either AnnuityAccount or AnnuitySecurity
Instance Attribute Summary collapse
-
#earned_interest ⇒ InterestRateEntity10
The periodic (usually monthly) interest rate earned on the account.
-
#number_modal_payouts ⇒ Integer
Total number of payouts.
-
#payout_amount ⇒ Float
Amount paid out, based on mode frequency.
-
#payout_change_amount ⇒ Float
Incremental modal amount (positive or negative) by which the payout amount will be changed; used exclusive of payoutPercentage.
-
#payout_change_percentage ⇒ Float
Percentage of the accumulated value to be paid to the payee each year; used exclusive of payoutChangeAmount.
-
#payout_end_date ⇒ Date
Date the payout ends.
-
#payout_mode ⇒ PayoutMode2
Frequency of annuity payments.
-
#payout_start_date ⇒ Date
Date the payout starts.
-
#payout_type ⇒ PayoutType2
Indicates type of payout such as immediate or deferred.
-
#period_certain_type ⇒ PeriodCertainType2
The number of modal periods comprising the duration of the certain period of an annuity payout.
-
#policy_product_type ⇒ PolicyProductType2
The type of annuity product, e.g.
-
#surrender_value ⇒ Float
Cash surrender value (net) available if contract is surrendered.
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(earned_interest: SKIP, payout_type: SKIP, policy_product_type: SKIP, payout_amount: SKIP, payout_mode: SKIP, payout_start_date: SKIP, payout_end_date: SKIP, number_modal_payouts: SKIP, surrender_value: SKIP, payout_change_percentage: SKIP, payout_change_amount: SKIP, period_certain_type: SKIP, additional_properties: nil) ⇒ AnnuityDetailsEntity
constructor
A new instance of AnnuityDetailsEntity.
-
#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(earned_interest: SKIP, payout_type: SKIP, policy_product_type: SKIP, payout_amount: SKIP, payout_mode: SKIP, payout_start_date: SKIP, payout_end_date: SKIP, number_modal_payouts: SKIP, surrender_value: SKIP, payout_change_percentage: SKIP, payout_change_amount: SKIP, period_certain_type: SKIP, additional_properties: nil) ⇒ AnnuityDetailsEntity
Returns a new instance of AnnuityDetailsEntity.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 105 def initialize(earned_interest: SKIP, payout_type: SKIP, policy_product_type: SKIP, payout_amount: SKIP, payout_mode: SKIP, payout_start_date: SKIP, payout_end_date: SKIP, number_modal_payouts: SKIP, surrender_value: SKIP, payout_change_percentage: SKIP, payout_change_amount: SKIP, period_certain_type: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @earned_interest = earned_interest unless earned_interest == SKIP @payout_type = payout_type unless payout_type == SKIP @policy_product_type = policy_product_type unless policy_product_type == SKIP @payout_amount = payout_amount unless payout_amount == SKIP @payout_mode = payout_mode unless payout_mode == SKIP @payout_start_date = payout_start_date unless payout_start_date == SKIP @payout_end_date = payout_end_date unless payout_end_date == SKIP @number_modal_payouts = number_modal_payouts unless number_modal_payouts == SKIP @surrender_value = surrender_value unless surrender_value == SKIP @payout_change_percentage = payout_change_percentage unless payout_change_percentage == SKIP @payout_change_amount = payout_change_amount unless payout_change_amount == SKIP @period_certain_type = period_certain_type unless period_certain_type == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#earned_interest ⇒ InterestRateEntity10
The periodic (usually monthly) interest rate earned on the account
15 16 17 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 15 def earned_interest @earned_interest end |
#number_modal_payouts ⇒ Integer
Total number of payouts
43 44 45 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 43 def number_modal_payouts @number_modal_payouts end |
#payout_amount ⇒ Float
Amount paid out, based on mode frequency
27 28 29 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 27 def payout_amount @payout_amount end |
#payout_change_amount ⇒ Float
Incremental modal amount (positive or negative) by which the payout amount will be changed; used exclusive of payoutPercentage
57 58 59 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 57 def payout_change_amount @payout_change_amount end |
#payout_change_percentage ⇒ Float
Percentage of the accumulated value to be paid to the payee each year; used exclusive of payoutChangeAmount
52 53 54 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 52 def payout_change_percentage @payout_change_percentage end |
#payout_end_date ⇒ Date
Date the payout ends
39 40 41 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 39 def payout_end_date @payout_end_date end |
#payout_mode ⇒ PayoutMode2
Frequency of annuity payments
31 32 33 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 31 def payout_mode @payout_mode end |
#payout_start_date ⇒ Date
Date the payout starts
35 36 37 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 35 def payout_start_date @payout_start_date end |
#payout_type ⇒ PayoutType2
Indicates type of payout such as immediate or deferred
19 20 21 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 19 def payout_type @payout_type end |
#period_certain_type ⇒ PeriodCertainType2
The number of modal periods comprising the duration of the certain period of an annuity payout
62 63 64 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 62 def period_certain_type @period_certain_type end |
#policy_product_type ⇒ PolicyProductType2
The type of annuity product, e.g. Fixed or Variable
23 24 25 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 23 def policy_product_type @policy_product_type end |
#surrender_value ⇒ Float
Cash surrender value (net) available if contract is surrendered
47 48 49 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 47 def surrender_value @surrender_value end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 131 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. earned_interest = InterestRateEntity10.from_hash(hash['earnedInterest']) if hash['earnedInterest'] payout_type = hash.key?('payoutType') ? hash['payoutType'] : SKIP policy_product_type = hash.key?('policyProductType') ? hash['policyProductType'] : SKIP payout_amount = hash.key?('payoutAmount') ? hash['payoutAmount'] : SKIP payout_mode = hash.key?('payoutMode') ? hash['payoutMode'] : SKIP payout_start_date = hash.key?('payoutStartDate') ? hash['payoutStartDate'] : SKIP payout_end_date = hash.key?('payoutEndDate') ? hash['payoutEndDate'] : SKIP number_modal_payouts = hash.key?('numberModalPayouts') ? hash['numberModalPayouts'] : SKIP surrender_value = hash.key?('surrenderValue') ? hash['surrenderValue'] : SKIP payout_change_percentage = hash.key?('payoutChangePercentage') ? hash['payoutChangePercentage'] : SKIP payout_change_amount = hash.key?('payoutChangeAmount') ? hash['payoutChangeAmount'] : SKIP period_certain_type = hash.key?('periodCertainType') ? hash['periodCertainType'] : 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. AnnuityDetailsEntity.new(earned_interest: earned_interest, payout_type: payout_type, policy_product_type: policy_product_type, payout_amount: payout_amount, payout_mode: payout_mode, payout_start_date: payout_start_date, payout_end_date: payout_end_date, number_modal_payouts: number_modal_payouts, surrender_value: surrender_value, payout_change_percentage: payout_change_percentage, payout_change_amount: payout_change_amount, period_certain_type: period_certain_type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 65 def self.names @_hash = {} if @_hash.nil? @_hash['earned_interest'] = 'earnedInterest' @_hash['payout_type'] = 'payoutType' @_hash['policy_product_type'] = 'policyProductType' @_hash['payout_amount'] = 'payoutAmount' @_hash['payout_mode'] = 'payoutMode' @_hash['payout_start_date'] = 'payoutStartDate' @_hash['payout_end_date'] = 'payoutEndDate' @_hash['number_modal_payouts'] = 'numberModalPayouts' @_hash['surrender_value'] = 'surrenderValue' @_hash['payout_change_percentage'] = 'payoutChangePercentage' @_hash['payout_change_amount'] = 'payoutChangeAmount' @_hash['period_certain_type'] = 'periodCertainType' @_hash end |
.nullables ⇒ Object
An array for nullable fields
101 102 103 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 101 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 83 def self.optionals %w[ earned_interest payout_type policy_product_type payout_amount payout_mode payout_start_date payout_end_date number_modal_payouts surrender_value payout_change_percentage payout_change_amount period_certain_type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 193 def inspect class_name = self.class.name.split('::').last "<#{class_name} earned_interest: #{@earned_interest.inspect}, payout_type:"\ " #{@payout_type.inspect}, policy_product_type: #{@policy_product_type.inspect},"\ " payout_amount: #{@payout_amount.inspect}, payout_mode: #{@payout_mode.inspect},"\ " payout_start_date: #{@payout_start_date.inspect}, payout_end_date:"\ " #{@payout_end_date.inspect}, number_modal_payouts: #{@number_modal_payouts.inspect},"\ " surrender_value: #{@surrender_value.inspect}, payout_change_percentage:"\ " #{@payout_change_percentage.inspect}, payout_change_amount:"\ " #{@payout_change_amount.inspect}, period_certain_type: #{@period_certain_type.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
181 182 183 184 185 186 187 188 189 190 |
# File 'lib/fdx_v660_api/models/annuity_details_entity.rb', line 181 def to_s class_name = self.class.name.split('::').last "<#{class_name} earned_interest: #{@earned_interest}, payout_type: #{@payout_type},"\ " policy_product_type: #{@policy_product_type}, payout_amount: #{@payout_amount},"\ " payout_mode: #{@payout_mode}, payout_start_date: #{@payout_start_date}, payout_end_date:"\ " #{@payout_end_date}, number_modal_payouts: #{@number_modal_payouts}, surrender_value:"\ " #{@surrender_value}, payout_change_percentage: #{@payout_change_percentage},"\ " payout_change_amount: #{@payout_change_amount}, period_certain_type:"\ " #{@period_certain_type}, additional_properties: #{@additional_properties}>" end |