Class: VoiceML::PricingPhoneNumberPrice

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

Constant Summary collapse

ATTRIBUTES =
%w[number_type base_price current_price].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ PricingPhoneNumberPrice

Returns a new instance of PricingPhoneNumberPrice.



81
82
83
# File 'lib/voiceml/models/pricing.rb', line 81

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

Class Method Details

.from_hash(h) ⇒ Object



84
# File 'lib/voiceml/models/pricing.rb', line 84

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