Class: EVSS::PCIU::PhoneNumber

Inherits:
BaseModel show all
Defined in:
lib/evss/pciu/phone_number.rb

Overview

Model for PCIU phone numbers

Instance Attribute Summary collapse

Instance Attribute Details

#country_codeString

Returns The country code at the beginning of the phone number.

Returns:

  • (String)

    The country code at the beginning of the phone number



19
20
21
22
23
24
25
26
27
# File 'lib/evss/pciu/phone_number.rb', line 19

class PhoneNumber < BaseModel
  attribute :country_code, String
  attribute :number, String
  attribute :extension, String
  attribute :effective_date, DateTime

  validates :number, presence: true
  validates :number, format: { with: /\A\d+\z/, message: 'Only numbers are permitted.' }
end

#effective_dateDateTime

Returns Date at which the number was known to be valid.

Returns:

  • (DateTime)

    Date at which the number was known to be valid



19
20
21
22
23
24
25
26
27
# File 'lib/evss/pciu/phone_number.rb', line 19

class PhoneNumber < BaseModel
  attribute :country_code, String
  attribute :number, String
  attribute :extension, String
  attribute :effective_date, DateTime

  validates :number, presence: true
  validates :number, format: { with: /\A\d+\z/, message: 'Only numbers are permitted.' }
end

#extensionString

Returns The extension at the end of the phone number.

Returns:

  • (String)

    The extension at the end of the phone number



19
20
21
22
23
24
25
26
27
# File 'lib/evss/pciu/phone_number.rb', line 19

class PhoneNumber < BaseModel
  attribute :country_code, String
  attribute :number, String
  attribute :extension, String
  attribute :effective_date, DateTime

  validates :number, presence: true
  validates :number, format: { with: /\A\d+\z/, message: 'Only numbers are permitted.' }
end

#numberString

Returns The main phone number, digits only.

Returns:

  • (String)

    The main phone number, digits only



19
20
21
22
23
24
25
26
27
# File 'lib/evss/pciu/phone_number.rb', line 19

class PhoneNumber < BaseModel
  attribute :country_code, String
  attribute :number, String
  attribute :extension, String
  attribute :effective_date, DateTime

  validates :number, presence: true
  validates :number, format: { with: /\A\d+\z/, message: 'Only numbers are permitted.' }
end