Class: Nzbn::Models::PhoneNumber

Inherits:
Base
  • Object
show all
Defined in:
lib/nzbn/models/phone_number.rb

Overview

Phone number model

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize, #to_h, #to_json

Constructor Details

This class inherits a constructor from Nzbn::Models::Base

Instance Attribute Details

#phone_area_codeObject

Returns the value of attribute phone_area_code.



7
8
9
# File 'lib/nzbn/models/phone_number.rb', line 7

def phone_area_code
  @phone_area_code
end

#phone_country_codeObject

Returns the value of attribute phone_country_code.



7
8
9
# File 'lib/nzbn/models/phone_number.rb', line 7

def phone_country_code
  @phone_country_code
end

#phone_numberObject

Returns the value of attribute phone_number.



7
8
9
# File 'lib/nzbn/models/phone_number.rb', line 7

def phone_number
  @phone_number
end

#phone_purposeObject

Returns the value of attribute phone_purpose.



7
8
9
# File 'lib/nzbn/models/phone_number.rb', line 7

def phone_purpose
  @phone_purpose
end

#phone_purpose_descriptionObject

Returns the value of attribute phone_purpose_description.



7
8
9
# File 'lib/nzbn/models/phone_number.rb', line 7

def phone_purpose_description
  @phone_purpose_description
end

#start_dateObject

Returns the value of attribute start_date.



7
8
9
# File 'lib/nzbn/models/phone_number.rb', line 7

def start_date
  @start_date
end

#unique_identifierObject

Returns the value of attribute unique_identifier.



7
8
9
# File 'lib/nzbn/models/phone_number.rb', line 7

def unique_identifier
  @unique_identifier
end

Instance Method Details

#formatted_numberObject



10
11
12
13
# File 'lib/nzbn/models/phone_number.rb', line 10

def formatted_number
  parts = [phone_country_code, phone_area_code, phone_number].compact.reject(&:empty?)
  parts.join(' ')
end