Class: VoiceML::PricingOutboundCallPrice

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

Constant Summary collapse

ATTRIBUTES =
%w[base_price current_price].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ PricingOutboundCallPrice

Returns a new instance of PricingOutboundCallPrice.



28
29
30
# File 'lib/voiceml/models/pricing.rb', line 28

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

Class Method Details

.from_hash(h) ⇒ Object



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

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