Class: Telnyx::PhoneNumber

Inherits:
APIResource show all
Extended by:
APIOperations::List, APIOperations::NestedResource
Includes:
APIOperations::Delete, APIOperations::Save
Defined in:
lib/telnyx/phone_number.rb

Constant Summary collapse

OBJECT_NAME =
"phone_number".freeze

Instance Attribute Summary

Attributes inherited from APIResource

#save_with_parent

Class Method Summary collapse

Instance Method Summary collapse

Methods included from APIOperations::List

list

Methods included from APIOperations::NestedResource

nested_resource_class_methods

Methods included from APIOperations::Delete

#delete

Methods included from APIOperations::Save

included, #save

Methods inherited from APIResource

class_name, identified_resource_url, inherited, #refresh, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from TelnyxObject

#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Telnyx::TelnyxObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Telnyx::TelnyxObject

Class Method Details

.list_voice(*args, **kwargs) ⇒ Object



41
42
43
# File 'lib/telnyx/phone_number.rb', line 41

def self.list_voice(*args, **kwargs)
  list_voices(nil, *args, **kwargs)
end

.messagingObject



45
46
47
# File 'lib/telnyx/phone_number.rb', line 45

def self.messaging
  list_messagings(nil)
end

Instance Method Details

#inbound_channelsObject



37
38
39
# File 'lib/telnyx/phone_number.rb', line 37

def inbound_channels
  self.class.list_inbound_channels(nil).channels
end

#update_inbound_channels=(val) ⇒ Object



33
34
35
# File 'lib/telnyx/phone_number.rb', line 33

def update_inbound_channels=(val)
  self.class.update_inbound_channel(nil, nil, channels: val)
end

#update_jobs=(_val) ⇒ Object



49
50
51
# File 'lib/telnyx/phone_number.rb', line 49

def update_jobs=(_val)
  self.class.update_job(nil, nil, value)
end

#update_messaging(opts) ⇒ Object



25
26
27
# File 'lib/telnyx/phone_number.rb', line 25

def update_messaging(opts)
  self.class.update_messaging(id, nil, opts)
end

#update_voice(opts) ⇒ Object



29
30
31
# File 'lib/telnyx/phone_number.rb', line 29

def update_voice(opts)
  self.class.update_voice(id, nil, opts)
end