Class: BloomApi::Organization
- Defined in:
- lib/bloom_api/organization.rb
Overview
A class representing an organizational provider
Instance Method Summary collapse
-
#employer_identification_number ⇒ String
The organization’s employer identification number.
-
#is_subpart? ⇒ boolean
designates whether the organization is a part of another.
-
#name ⇒ String
The business name of the organization.
-
#official ⇒ OrganizationOfficial
The organization’s administrative official.
-
#other_name ⇒ String
An alternate name for the organization.
- #parent_organization ⇒ Organization
-
#tax_identification_number ⇒ String
The organization’s tax identification number.
Methods inherited from Provider
#business_address, #deactivation_date, #deactivation_reason, #initialize, #npi, #other_identifiers, #other_name_type, #practice_address, #reactivation_date, #recorded_at, #replacement_npi, #sole_proprietor?, #specialties, #taxonomy_groups, #type, #updated_at
Constructor Details
This class inherits a constructor from BloomApi::Provider
Instance Method Details
#employer_identification_number ⇒ String
Returns the organization’s employer identification number.
7 8 9 10 11 12 13 14 |
# File 'lib/bloom_api/organization.rb', line 7 def employer_identification_number case @raw_provider['employer_identification_number'] when '<UNAVAIL>' nil else @raw_provider['employer_identification_number'] end end |
#is_subpart? ⇒ boolean
designates whether the organization is a part of another
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/bloom_api/organization.rb', line 19 def is_subpart? case @raw_provider['organization_subpart'] when 'yes' true when 'no' false else nil end end |
#name ⇒ String
Returns the business name of the organization.
31 32 33 |
# File 'lib/bloom_api/organization.rb', line 31 def name @raw_provider['business_name'] end |
#official ⇒ OrganizationOfficial
Returns the organization’s administrative official.
36 37 38 39 40 |
# File 'lib/bloom_api/organization.rb', line 36 def official unless @raw_provider['organization_official'].nil? OrganizationOfficial.new(@raw_provider['organization_official']) end end |
#other_name ⇒ String
Returns an alternate name for the organization.
43 44 45 |
# File 'lib/bloom_api/organization.rb', line 43 def other_name @raw_provider['other_name'] end |
#parent_organization ⇒ Organization
49 50 51 52 53 |
# File 'lib/bloom_api/organization.rb', line 49 def parent_organization unless @raw_provider['parent_org'].nil? Organization.new(@raw_provider['parent_org']) end end |
#tax_identification_number ⇒ String
Returns the organization’s tax identification number.
56 57 58 |
# File 'lib/bloom_api/organization.rb', line 56 def tax_identification_number @raw_provider['tax_identification_number'] end |