Class: VoiceML::PricingOutboundCallPriceWithOrigin

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 = {}) ⇒ PricingOutboundCallPriceWithOrigin

Returns a new instance of PricingOutboundCallPriceWithOrigin.



36
37
38
39
40
# File 'lib/voiceml/models/pricing.rb', line 36

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

Instance Attribute Details

#base_priceObject (readonly)

Returns the value of attribute base_price.



35
36
37
# File 'lib/voiceml/models/pricing.rb', line 35

def base_price
  @base_price
end

#current_priceObject (readonly)

Returns the value of attribute current_price.



35
36
37
# File 'lib/voiceml/models/pricing.rb', line 35

def current_price
  @current_price
end

#origination_prefixesObject (readonly)

Returns the value of attribute origination_prefixes.



35
36
37
# File 'lib/voiceml/models/pricing.rb', line 35

def origination_prefixes
  @origination_prefixes
end

Class Method Details

.from_hash(h) ⇒ Object



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

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