Class: PreludeSDK::Models::LookupLookupResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/prelude_sdk/models/lookup_lookup_response.rb,
sig/prelude_sdk/models/lookup_lookup_response.rbs

Overview

See Also:

  • PreludeSDK::Resources::Lookup#lookup

Defined Under Namespace

Modules: Flag, LineType Classes: NetworkInfo, OriginalNetworkInfo

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(carrier_name: nil, mcc: nil, mnc: nil) ⇒ Object

The current carrier information.

Parameters:

  • carrier_name (String) (defaults to: nil)

    The name of the carrier.

  • mcc (String) (defaults to: nil)

    Mobile Country Code.

  • mnc (String) (defaults to: nil)

    Mobile Network Code.



# File 'lib/prelude_sdk/models/lookup_lookup_response.rb', line 195

Instance Attribute Details

#caller_nameString?

The CNAM (Caller ID Name) associated with the phone number. Contact us if you need to use this functionality. Once enabled, put cnam option to type query parameter.

Parameters:

  • (String)

Returns:

  • (String, nil)


13
# File 'lib/prelude_sdk/models/lookup_lookup_response.rb', line 13

optional :caller_name, String

#country_codeString?

The country code of the phone number.

Parameters:

  • (String)

Returns:

  • (String, nil)


19
# File 'lib/prelude_sdk/models/lookup_lookup_response.rb', line 19

optional :country_code, String

#flagsArray<Symbol, PreludeSDK::Models::LookupLookupResponse::Flag>?

A list of flags associated with the phone number.

  • ported - Indicates the phone number has been transferred from one carrier to another.
  • temporary - Indicates the phone number is likely a temporary or virtual number, often used for verification services or burner phones.

Returns:



30
31
# File 'lib/prelude_sdk/models/lookup_lookup_response.rb', line 30

optional :flags,
-> { PreludeSDK::Internal::Type::ArrayOf[enum: PreludeSDK::Models::LookupLookupResponse::Flag] }

#line_typeSymbol, ...

The type of phone line.

  • calling_cards - Numbers that are associated with providers of pre-paid domestic and international calling cards.
  • fixed_line - Landline phone numbers.
  • isp - Numbers reserved for Internet Service Providers.
  • local_rate - Numbers that can be assigned non-geographically.
  • mobile - Mobile phone numbers.
  • other - Other types of services.
  • pager - Number ranges specifically allocated to paging devices.
  • payphone - Allocated numbers for payphone kiosks in some countries.
  • premium_rate - Landline numbers where the calling party pays more than standard.
  • satellite - Satellite phone numbers.
  • service - Automated applications.
  • shared_cost - Specific landline ranges where the cost of making the call is shared between the calling and called party.
  • short_codes_commercial - Short codes are memorable, easy-to-use numbers, like the UK's NHS 111, often sold to businesses. Not available in all countries.
  • toll_free - Number where the called party pays for the cost of the call not the calling party.
  • universal_access - Number ranges reserved for Universal Access initiatives.
  • unknown - Unknown phone number type.
  • vpn - Numbers are used exclusively within a private telecommunications network, connecting the operator's terminals internally and not accessible via the public telephone network.
  • voice_mail - A specific category of Interactive Voice Response (IVR) services.
  • voip - Specific ranges for providers of VoIP services to allow incoming calls from the regular telephony network.


67
# File 'lib/prelude_sdk/models/lookup_lookup_response.rb', line 67

optional :line_type, enum: -> { PreludeSDK::Models::LookupLookupResponse::LineType }

#network_infoPreludeSDK::Models::LookupLookupResponse::NetworkInfo?

The current carrier information.



73
# File 'lib/prelude_sdk/models/lookup_lookup_response.rb', line 73

optional :network_info, -> { PreludeSDK::Models::LookupLookupResponse::NetworkInfo }

#original_network_infoPreludeSDK::Models::LookupLookupResponse::OriginalNetworkInfo?

The original carrier information.



79
# File 'lib/prelude_sdk/models/lookup_lookup_response.rb', line 79

optional :original_network_info, -> { PreludeSDK::Models::LookupLookupResponse::OriginalNetworkInfo }

#phone_numberString?

The phone number.

Parameters:

  • (String)

Returns:

  • (String, nil)


85
# File 'lib/prelude_sdk/models/lookup_lookup_response.rb', line 85

optional :phone_number, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/prelude_sdk/models/lookup_lookup_response.rb', line 111

Instance Method Details

#to_hash{

Returns:

  • ({)


61
# File 'sig/prelude_sdk/models/lookup_lookup_response.rbs', line 61

def to_hash: -> {