Class: EVSS::PPIU::ControlInformation

Inherits:
Object
  • Object
show all
Defined in:
lib/evss/ppiu/control_information.rb

Overview

Determines if the user can update their address. Updates are only allowed when all member variables of this object are ‘true’

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs) ⇒ ControlInformation

This is used to map the misspelling we get from EVSS to the correct spelling of “identity”



46
47
48
49
# File 'lib/evss/ppiu/control_information.rb', line 46

def initialize(attrs)
  super(attrs)
  self.identity_indicator = attrs['indentity_indicator']
end

Instance Attribute Details

#can_update_addressBoolean

All other variables in this object must be true for this to be true.

Returns:

  • (Boolean)

    Global flag indicating if the user can update their address.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/evss/ppiu/control_information.rb', line 31

class ControlInformation
  include Virtus.model

  attribute :can_update_address, Boolean
  attribute :corp_avail_indicator, Boolean
  attribute :corp_rec_found_indicator, Boolean
  attribute :has_no_bdn_payments_indicator, Boolean
  attribute :identity_indicator, Boolean
  attribute :is_competent_indicator, Boolean
  attribute :index_indicator, Boolean
  attribute :no_fiduciary_assigned_indicator, Boolean
  attribute :not_deceased_indicator, Boolean

  # This is used to map the misspelling we get from EVSS
  # to the correct spelling of "identity"
  def initialize(attrs)
    super(attrs)
    self.identity_indicator = attrs['indentity_indicator']
  end

  def authorized?
    is_competent_indicator &&
      no_fiduciary_assigned_indicator &&
      not_deceased_indicator
  end
end

#corp_avail_indicatorBoolean

Returns BGS indicator for which BGS has not provided further documentation.

Returns:

  • (Boolean)

    BGS indicator for which BGS has not provided further documentation



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/evss/ppiu/control_information.rb', line 31

class ControlInformation
  include Virtus.model

  attribute :can_update_address, Boolean
  attribute :corp_avail_indicator, Boolean
  attribute :corp_rec_found_indicator, Boolean
  attribute :has_no_bdn_payments_indicator, Boolean
  attribute :identity_indicator, Boolean
  attribute :is_competent_indicator, Boolean
  attribute :index_indicator, Boolean
  attribute :no_fiduciary_assigned_indicator, Boolean
  attribute :not_deceased_indicator, Boolean

  # This is used to map the misspelling we get from EVSS
  # to the correct spelling of "identity"
  def initialize(attrs)
    super(attrs)
    self.identity_indicator = attrs['indentity_indicator']
  end

  def authorized?
    is_competent_indicator &&
      no_fiduciary_assigned_indicator &&
      not_deceased_indicator
  end
end

#corp_rec_found_indicatorBoolean

Returns BGS indicator for which BGS has not provided further documentation.

Returns:

  • (Boolean)

    BGS indicator for which BGS has not provided further documentation



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/evss/ppiu/control_information.rb', line 31

class ControlInformation
  include Virtus.model

  attribute :can_update_address, Boolean
  attribute :corp_avail_indicator, Boolean
  attribute :corp_rec_found_indicator, Boolean
  attribute :has_no_bdn_payments_indicator, Boolean
  attribute :identity_indicator, Boolean
  attribute :is_competent_indicator, Boolean
  attribute :index_indicator, Boolean
  attribute :no_fiduciary_assigned_indicator, Boolean
  attribute :not_deceased_indicator, Boolean

  # This is used to map the misspelling we get from EVSS
  # to the correct spelling of "identity"
  def initialize(attrs)
    super(attrs)
    self.identity_indicator = attrs['indentity_indicator']
  end

  def authorized?
    is_competent_indicator &&
      no_fiduciary_assigned_indicator &&
      not_deceased_indicator
  end
end

#has_no_bdn_payments_indicatorBoolean

Returns true unless the veteran has received BDN payments

Returns:

  • (Boolean)

    Returns true unless the veteran has received BDN payments



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/evss/ppiu/control_information.rb', line 31

class ControlInformation
  include Virtus.model

  attribute :can_update_address, Boolean
  attribute :corp_avail_indicator, Boolean
  attribute :corp_rec_found_indicator, Boolean
  attribute :has_no_bdn_payments_indicator, Boolean
  attribute :identity_indicator, Boolean
  attribute :is_competent_indicator, Boolean
  attribute :index_indicator, Boolean
  attribute :no_fiduciary_assigned_indicator, Boolean
  attribute :not_deceased_indicator, Boolean

  # This is used to map the misspelling we get from EVSS
  # to the correct spelling of "identity"
  def initialize(attrs)
    super(attrs)
    self.identity_indicator = attrs['indentity_indicator']
  end

  def authorized?
    is_competent_indicator &&
      no_fiduciary_assigned_indicator &&
      not_deceased_indicator
  end
end

#identity_indicatorBoolean

Returns BGS indicator for which BGS has not provided further documentation.

Returns:

  • (Boolean)

    BGS indicator for which BGS has not provided further documentation



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/evss/ppiu/control_information.rb', line 31

class ControlInformation
  include Virtus.model

  attribute :can_update_address, Boolean
  attribute :corp_avail_indicator, Boolean
  attribute :corp_rec_found_indicator, Boolean
  attribute :has_no_bdn_payments_indicator, Boolean
  attribute :identity_indicator, Boolean
  attribute :is_competent_indicator, Boolean
  attribute :index_indicator, Boolean
  attribute :no_fiduciary_assigned_indicator, Boolean
  attribute :not_deceased_indicator, Boolean

  # This is used to map the misspelling we get from EVSS
  # to the correct spelling of "identity"
  def initialize(attrs)
    super(attrs)
    self.identity_indicator = attrs['indentity_indicator']
  end

  def authorized?
    is_competent_indicator &&
      no_fiduciary_assigned_indicator &&
      not_deceased_indicator
  end
end

#index_indicatorBoolean

Returns BGS indicator for which BGS has not provided further documentation.

Returns:

  • (Boolean)

    BGS indicator for which BGS has not provided further documentation



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/evss/ppiu/control_information.rb', line 31

class ControlInformation
  include Virtus.model

  attribute :can_update_address, Boolean
  attribute :corp_avail_indicator, Boolean
  attribute :corp_rec_found_indicator, Boolean
  attribute :has_no_bdn_payments_indicator, Boolean
  attribute :identity_indicator, Boolean
  attribute :is_competent_indicator, Boolean
  attribute :index_indicator, Boolean
  attribute :no_fiduciary_assigned_indicator, Boolean
  attribute :not_deceased_indicator, Boolean

  # This is used to map the misspelling we get from EVSS
  # to the correct spelling of "identity"
  def initialize(attrs)
    super(attrs)
    self.identity_indicator = attrs['indentity_indicator']
  end

  def authorized?
    is_competent_indicator &&
      no_fiduciary_assigned_indicator &&
      not_deceased_indicator
  end
end

#is_competent_indicatorBoolean

Returns true if the veteran has not been deemed legally incompetent

Returns:

  • (Boolean)

    Returns true if the veteran has not been deemed legally incompetent



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/evss/ppiu/control_information.rb', line 31

class ControlInformation
  include Virtus.model

  attribute :can_update_address, Boolean
  attribute :corp_avail_indicator, Boolean
  attribute :corp_rec_found_indicator, Boolean
  attribute :has_no_bdn_payments_indicator, Boolean
  attribute :identity_indicator, Boolean
  attribute :is_competent_indicator, Boolean
  attribute :index_indicator, Boolean
  attribute :no_fiduciary_assigned_indicator, Boolean
  attribute :not_deceased_indicator, Boolean

  # This is used to map the misspelling we get from EVSS
  # to the correct spelling of "identity"
  def initialize(attrs)
    super(attrs)
    self.identity_indicator = attrs['indentity_indicator']
  end

  def authorized?
    is_competent_indicator &&
      no_fiduciary_assigned_indicator &&
      not_deceased_indicator
  end
end

#no_fiduciary_assigned_indicatorBoolean

Returns true if the veteran has not been assigned a fiduciary

Returns:

  • (Boolean)

    Returns true if the veteran has not been assigned a fiduciary



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/evss/ppiu/control_information.rb', line 31

class ControlInformation
  include Virtus.model

  attribute :can_update_address, Boolean
  attribute :corp_avail_indicator, Boolean
  attribute :corp_rec_found_indicator, Boolean
  attribute :has_no_bdn_payments_indicator, Boolean
  attribute :identity_indicator, Boolean
  attribute :is_competent_indicator, Boolean
  attribute :index_indicator, Boolean
  attribute :no_fiduciary_assigned_indicator, Boolean
  attribute :not_deceased_indicator, Boolean

  # This is used to map the misspelling we get from EVSS
  # to the correct spelling of "identity"
  def initialize(attrs)
    super(attrs)
    self.identity_indicator = attrs['indentity_indicator']
  end

  def authorized?
    is_competent_indicator &&
      no_fiduciary_assigned_indicator &&
      not_deceased_indicator
  end
end

#not_deceased_indicatorBoolean

Returns true if the veteran is still alive

Returns:

  • (Boolean)

    Returns true if the veteran is still alive



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/evss/ppiu/control_information.rb', line 31

class ControlInformation
  include Virtus.model

  attribute :can_update_address, Boolean
  attribute :corp_avail_indicator, Boolean
  attribute :corp_rec_found_indicator, Boolean
  attribute :has_no_bdn_payments_indicator, Boolean
  attribute :identity_indicator, Boolean
  attribute :is_competent_indicator, Boolean
  attribute :index_indicator, Boolean
  attribute :no_fiduciary_assigned_indicator, Boolean
  attribute :not_deceased_indicator, Boolean

  # This is used to map the misspelling we get from EVSS
  # to the correct spelling of "identity"
  def initialize(attrs)
    super(attrs)
    self.identity_indicator = attrs['indentity_indicator']
  end

  def authorized?
    is_competent_indicator &&
      no_fiduciary_assigned_indicator &&
      not_deceased_indicator
  end
end

Instance Method Details

#authorized?Boolean

Returns:

  • (Boolean)


51
52
53
54
55
# File 'lib/evss/ppiu/control_information.rb', line 51

def authorized?
  is_competent_indicator &&
    no_fiduciary_assigned_indicator &&
    not_deceased_indicator
end