Class: Telnyx::Models::Dir::PhoneNumberCreateResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/dir/phone_number_create_response.rb

Overview

See Also:

  • Resources::Dir::PhoneNumbers#create

Instance Attribute 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(data:) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::Dir::PhoneNumberCreateResponse for more details.

Bulk-add success response (HTTP 201). All numbers in the request were accepted into a single new batch. Every entry in ‘data` shares the same `batch_id` - read it from any element to obtain the batch id for subsequent `GET …/phone_number_batches/batch_id` calls. If any number in the request fails (schema-invalid, not in inventory, already attached to another DIR, etc.) the entire request is rejected with HTTP 400 and the canonical Telnyx error envelope; the success body described here is therefore an all-or-nothing payload.

Parameters:



# File 'lib/telnyx/models/dir/phone_number_create_response.rb', line 15

Instance Attribute Details

#dataArray<Telnyx::Models::Dir::DirPhoneNumber>

Phone numbers accepted into the new batch. List order mirrors the request order. Each element shares the same ‘batch_id`.



13
# File 'lib/telnyx/models/dir/phone_number_create_response.rb', line 13

required :data, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Dir::DirPhoneNumber] }