Class: VoiceML::PricingVoiceNumber

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

Returns a new instance of PricingVoiceNumber.



126
127
128
129
130
131
132
133
134
# File 'lib/voiceml/models/pricing.rb', line 126

def initialize(attrs = {})
  @number      = attrs['number'] || attrs[:number]
  @country     = attrs['country'] || attrs[:country]
  @iso_country = attrs['iso_country'] || attrs[:iso_country]
  @outbound_call_price = PricingOutboundCallPrice.from_hash(attrs['outbound_call_price'])
  @inbound_call_price  = PricingInboundCallPrice.from_hash(attrs['inbound_call_price'])
  @price_unit = attrs['price_unit'] || attrs[:price_unit]
  @url        = attrs['url'] || attrs[:url]
end

Instance Attribute Details

#countryObject (readonly)

Returns the value of attribute country.



125
126
127
# File 'lib/voiceml/models/pricing.rb', line 125

def country
  @country
end

#inbound_call_priceObject (readonly)

Returns the value of attribute inbound_call_price.



125
126
127
# File 'lib/voiceml/models/pricing.rb', line 125

def inbound_call_price
  @inbound_call_price
end

#iso_countryObject (readonly)

Returns the value of attribute iso_country.



125
126
127
# File 'lib/voiceml/models/pricing.rb', line 125

def iso_country
  @iso_country
end

#numberObject (readonly)

Returns the value of attribute number.



125
126
127
# File 'lib/voiceml/models/pricing.rb', line 125

def number
  @number
end

#outbound_call_priceObject (readonly)

Returns the value of attribute outbound_call_price.



125
126
127
# File 'lib/voiceml/models/pricing.rb', line 125

def outbound_call_price
  @outbound_call_price
end

#price_unitObject (readonly)

Returns the value of attribute price_unit.



125
126
127
# File 'lib/voiceml/models/pricing.rb', line 125

def price_unit
  @price_unit
end

#urlObject (readonly)

Returns the value of attribute url.



125
126
127
# File 'lib/voiceml/models/pricing.rb', line 125

def url
  @url
end

Class Method Details

.from_hash(h) ⇒ Object



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

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