Class: HighLevel::Resources::PhoneSystem
- Defined in:
- lib/high_level/resources/phone_system.rb
Instance Method Summary collapse
-
#active_numbers(location_id:, page_size: nil, page: nil, search_filter: nil, skip_number_pool: nil, **_opts) ⇒ Object
List active numbers.
-
#available_numbers(location_id:, country_code: nil, number_types: nil, first_part: nil, last_part: nil, anywhere: nil, sms_enabled: nil, mms_enabled: nil, voice_enabled: nil, **_opts) ⇒ Object
List available phone numbers.
-
#get_number_pool_list(location_id: nil, **_opts) ⇒ Object
List Number Pools.
-
#purchase_phone_number(location_id:, body:, **_opts) ⇒ Object
Purchase a phone number.
Methods inherited from Base
Constructor Details
This class inherits a constructor from HighLevel::Resources::Base
Instance Method Details
#active_numbers(location_id:, page_size: nil, page: nil, search_filter: nil, skip_number_pool: nil, **_opts) ⇒ Object
List active numbers
Retrieve a paginated list of active phone numbers for a specific location. Supports filtering, pagination, and optional exclusion of number pool assignments.
48 49 50 51 52 53 54 55 |
# File 'lib/high_level/resources/phone_system.rb', line 48 def active_numbers(location_id:, page_size: nil, page: nil, search_filter: nil, skip_number_pool: nil, **_opts) request( method: :get, path: "/phone-system/numbers/location/#{location_id}", security: ["Location-Access"], params: { "pageSize" => page_size, "page" => page, "searchFilter" => search_filter, "skipNumberPool" => skip_number_pool }.compact ) end |
#available_numbers(location_id:, country_code: nil, number_types: nil, first_part: nil, last_part: nil, anywhere: nil, sms_enabled: nil, mms_enabled: nil, voice_enabled: nil, **_opts) ⇒ Object
List available phone numbers
Search for available phone numbers to purchase for a specific location. Supports filtering by number pattern, type, and capabilities.
24 25 26 27 28 29 30 31 |
# File 'lib/high_level/resources/phone_system.rb', line 24 def available_numbers(location_id:, country_code: nil, number_types: nil, first_part: nil, last_part: nil, anywhere: nil, sms_enabled: nil, mms_enabled: nil, voice_enabled: nil, **_opts) request( method: :get, path: "/phone-system/numbers/location/#{location_id}/available", security: ["Location-Access"], params: { "countryCode" => country_code, "numberTypes" => number_types, "firstPart" => first_part, "lastPart" => last_part, "anywhere" => anywhere, "smsEnabled" => sms_enabled, "mmsEnabled" => mms_enabled, "voiceEnabled" => voice_enabled }.compact ) end |
#get_number_pool_list(location_id: nil, **_opts) ⇒ Object
List Number Pools
Get list of number pools
12 13 14 15 16 17 18 19 |
# File 'lib/high_level/resources/phone_system.rb', line 12 def get_number_pool_list(location_id: nil, **_opts) request( method: :get, path: "/phone-system/number-pools", security: ["Location-Access"], params: { "locationId" => location_id }.compact ) end |
#purchase_phone_number(location_id:, body:, **_opts) ⇒ Object
Purchase a phone number
Purchase a phone number for a specific location.
36 37 38 39 40 41 42 43 |
# File 'lib/high_level/resources/phone_system.rb', line 36 def purchase_phone_number(location_id:, body:, **_opts) request( method: :post, path: "/phone-system/numbers/location/#{location_id}/purchase", security: ["Location-Access"], body: body ) end |