Class: SurgeAPI::Models::PhoneNumberPurchaseParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/surge_api/models/phone_number_purchase_params.rb

Overview

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(area_code: nil, latitude: nil, longitude: nil, type: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see SurgeAPI::Models::PhoneNumberPurchaseParams for more details.

Parameters:

  • area_code (String) (defaults to: nil)

    The desired area code for this phone number. If provided without type, the type

  • latitude (Float) (defaults to: nil)

    Latitude to search for nearby phone numbers. Must be used with longitude. If pro

  • longitude (Float) (defaults to: nil)

    Longitude to search for nearby phone numbers. Must be used with latitude. If pro

  • type (Symbol, SurgeAPI::Models::PhoneNumberPurchaseParams::Type) (defaults to: nil)

    Whether the phone number is local or toll-free. Can be omitted if area_code or l

  • request_options (SurgeAPI::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/surge_api/models/phone_number_purchase_params.rb', line 38

Instance Attribute Details

#area_codeString?

The desired area code for this phone number. If provided without type, the type will be inferred.

Returns:

  • (String, nil)


15
# File 'lib/surge_api/models/phone_number_purchase_params.rb', line 15

optional :area_code, String

#latitudeFloat?

Latitude to search for nearby phone numbers. Must be used with longitude. If provided without type, type will be inferred as ‘local’.

Returns:

  • (Float, nil)


22
# File 'lib/surge_api/models/phone_number_purchase_params.rb', line 22

optional :latitude, Float

#longitudeFloat?

Longitude to search for nearby phone numbers. Must be used with latitude. If provided without type, type will be inferred as ‘local’.

Returns:

  • (Float, nil)


29
# File 'lib/surge_api/models/phone_number_purchase_params.rb', line 29

optional :longitude, Float

#typeSymbol, ...

Whether the phone number is local or toll-free. Can be omitted if area_code or latitude/longitude are provided.



36
# File 'lib/surge_api/models/phone_number_purchase_params.rb', line 36

optional :type, enum: -> { SurgeAPI::PhoneNumberPurchaseParams::Type }