Class: VoiceML::PricingOutboundPrefixPrice

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ PricingOutboundPrefixPrice

Returns a new instance of PricingOutboundPrefixPrice.



46
47
48
49
50
51
# File 'lib/voiceml/models/pricing.rb', line 46

def initialize(attrs = {})
  @prefixes      = attrs['prefixes'] || attrs[:prefixes] || []
  @base_price    = attrs['base_price'] || attrs[:base_price]
  @current_price = attrs['current_price'] || attrs[:current_price]
  @friendly_name = attrs['friendly_name'] || attrs[:friendly_name]
end

Instance Attribute Details

#base_priceObject (readonly)

Returns the value of attribute base_price.



45
46
47
# File 'lib/voiceml/models/pricing.rb', line 45

def base_price
  @base_price
end

#current_priceObject (readonly)

Returns the value of attribute current_price.



45
46
47
# File 'lib/voiceml/models/pricing.rb', line 45

def current_price
  @current_price
end

#friendly_nameObject (readonly)

Returns the value of attribute friendly_name.



45
46
47
# File 'lib/voiceml/models/pricing.rb', line 45

def friendly_name
  @friendly_name
end

#prefixesObject (readonly)

Returns the value of attribute prefixes.



45
46
47
# File 'lib/voiceml/models/pricing.rb', line 45

def prefixes
  @prefixes
end

Class Method Details

.from_hash(h) ⇒ Object



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

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