Class: VoiceML::RoutesV2PhoneNumber

Inherits:
Object
  • Object
show all
Defined in:
lib/voiceml/models/routes_v2.rb

Overview

Twilio routes/v2 Inbound Processing Region binding for a claimed phone number. Keyed by E.164 phone number or its PN sid; account resolved from HTTP Basic auth.

Constant Summary collapse

ATTRIBUTES =
%w[
  sid phone_number account_sid friendly_name voice_region url
  date_created date_updated
].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ RoutesV2PhoneNumber

Returns a new instance of RoutesV2PhoneNumber.



26
27
28
# File 'lib/voiceml/models/routes_v2.rb', line 26

def initialize(attrs = {})
  ATTRIBUTES.each { |f| instance_variable_set("@#{f}", attrs[f] || attrs[f.to_sym]) }
end

Class Method Details

.from_hash(h) ⇒ Object



29
# File 'lib/voiceml/models/routes_v2.rb', line 29

def self.from_hash(h); h.nil? ? nil : new(h); end