Class: VoiceML::PricingOutboundPrefixPriceWithOrigin

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

Returns a new instance of PricingOutboundPrefixPriceWithOrigin.



57
58
59
60
61
62
63
# File 'lib/voiceml/models/pricing.rb', line 57

def initialize(attrs = {})
  @origination_prefixes = attrs['origination_prefixes'] || attrs[:origination_prefixes] || []
  @destination_prefixes = attrs['destination_prefixes'] || attrs[:destination_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.



56
57
58
# File 'lib/voiceml/models/pricing.rb', line 56

def base_price
  @base_price
end

#current_priceObject (readonly)

Returns the value of attribute current_price.



56
57
58
# File 'lib/voiceml/models/pricing.rb', line 56

def current_price
  @current_price
end

#destination_prefixesObject (readonly)

Returns the value of attribute destination_prefixes.



56
57
58
# File 'lib/voiceml/models/pricing.rb', line 56

def destination_prefixes
  @destination_prefixes
end

#friendly_nameObject (readonly)

Returns the value of attribute friendly_name.



56
57
58
# File 'lib/voiceml/models/pricing.rb', line 56

def friendly_name
  @friendly_name
end

#origination_prefixesObject (readonly)

Returns the value of attribute origination_prefixes.



56
57
58
# File 'lib/voiceml/models/pricing.rb', line 56

def origination_prefixes
  @origination_prefixes
end

Class Method Details

.from_hash(h) ⇒ Object



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

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