Class: FdxV660Api::PolicyStatus

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

Overview

The status of an insurance policy account. | Value | Description | |-----|-----| | ACTIVE | At least one component of the insurance policy is in force | | DEATH_CLAIM_PAID | Benefits for a death claim have been settled with the insured | | DEATH_CLAIM_PENDING | A death claim has been submitted but not yet settled | | EXPIRED | Nonpayment of premium has exhausted the policy's Grace Period | | GRACE_PERIOD | A premium is due but before lapse in coverage begins | | LAPSE_PENDING | After the Grace Period has been exhausted but before final expiration; during Lapse Pending, policy reinstatement may still be possible | | TERMINATED | Either the insurance company or the insured cancel the coverage of a cancellable insurance policy | | WAIVER | A premium payment is waived under certain conditions due to a payer benefit clause |

Constant Summary collapse

POLICY_STATUS =
[
  # TODO: Write general description for ACTIVE
  ACTIVE = 'ACTIVE'.freeze,

  # TODO: Write general description for DEATH_CLAIM_PAID
  DEATH_CLAIM_PAID = 'DEATH_CLAIM_PAID'.freeze,

  # TODO: Write general description for DEATH_CLAIM_PENDING
  DEATH_CLAIM_PENDING = 'DEATH_CLAIM_PENDING'.freeze,

  # TODO: Write general description for EXPIRED
  EXPIRED = 'EXPIRED'.freeze,

  # TODO: Write general description for GRACE_PERIOD
  GRACE_PERIOD = 'GRACE_PERIOD'.freeze,

  # TODO: Write general description for LAPSE_PENDING
  LAPSE_PENDING = 'LAPSE_PENDING'.freeze,

  # TODO: Write general description for TERMINATED
  TERMINATED = 'TERMINATED'.freeze,

  # TODO: Write general description for WAIVER
  WAIVER = 'WAIVER'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = ACTIVE) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/fdx_v660_api/models/policy_status.rb', line 52

def self.from_value(value, default_value = ACTIVE)
  return default_value if value.nil?

  str = value.to_s.strip

  case str.downcase
  when 'active' then ACTIVE
  when 'death_claim_paid' then DEATH_CLAIM_PAID
  when 'death_claim_pending' then DEATH_CLAIM_PENDING
  when 'expired' then EXPIRED
  when 'grace_period' then GRACE_PERIOD
  when 'lapse_pending' then LAPSE_PENDING
  when 'terminated' then TERMINATED
  when 'waiver' then WAIVER
  else
    default_value
  end
end

.validate(value) ⇒ Object



46
47
48
49
50
# File 'lib/fdx_v660_api/models/policy_status.rb', line 46

def self.validate(value)
  return false if value.nil?

  true
end