Class: VoiceML::PricingVoiceNumberV2
- Inherits:
-
Object
- Object
- VoiceML::PricingVoiceNumberV2
- Defined in:
- lib/voiceml/models/pricing.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#destination_number ⇒ Object
readonly
Returns the value of attribute destination_number.
-
#inbound_call_price ⇒ Object
readonly
Returns the value of attribute inbound_call_price.
-
#iso_country ⇒ Object
readonly
Returns the value of attribute iso_country.
-
#origination_number ⇒ Object
readonly
Returns the value of attribute origination_number.
-
#outbound_call_prices ⇒ Object
readonly
Returns the value of attribute outbound_call_prices.
-
#price_unit ⇒ Object
readonly
Returns the value of attribute price_unit.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ PricingVoiceNumberV2
constructor
A new instance of PricingVoiceNumberV2.
Constructor Details
#initialize(attrs = {}) ⇒ PricingVoiceNumberV2
Returns a new instance of PricingVoiceNumberV2.
186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/voiceml/models/pricing.rb', line 186 def initialize(attrs = {}) @destination_number = attrs['destination_number'] || attrs[:destination_number] @origination_number = attrs['origination_number'] || attrs[:origination_number] @country = attrs['country'] || attrs[:country] @iso_country = attrs['iso_country'] || attrs[:iso_country] @outbound_call_prices = (attrs['outbound_call_prices'] || []).map { |h| PricingOutboundCallPriceWithOrigin.from_hash(h) } @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
#country ⇒ Object (readonly)
Returns the value of attribute country.
184 185 186 |
# File 'lib/voiceml/models/pricing.rb', line 184 def country @country end |
#destination_number ⇒ Object (readonly)
Returns the value of attribute destination_number.
184 185 186 |
# File 'lib/voiceml/models/pricing.rb', line 184 def destination_number @destination_number end |
#inbound_call_price ⇒ Object (readonly)
Returns the value of attribute inbound_call_price.
184 185 186 |
# File 'lib/voiceml/models/pricing.rb', line 184 def inbound_call_price @inbound_call_price end |
#iso_country ⇒ Object (readonly)
Returns the value of attribute iso_country.
184 185 186 |
# File 'lib/voiceml/models/pricing.rb', line 184 def iso_country @iso_country end |
#origination_number ⇒ Object (readonly)
Returns the value of attribute origination_number.
184 185 186 |
# File 'lib/voiceml/models/pricing.rb', line 184 def origination_number @origination_number end |
#outbound_call_prices ⇒ Object (readonly)
Returns the value of attribute outbound_call_prices.
184 185 186 |
# File 'lib/voiceml/models/pricing.rb', line 184 def outbound_call_prices @outbound_call_prices end |
#price_unit ⇒ Object (readonly)
Returns the value of attribute price_unit.
184 185 186 |
# File 'lib/voiceml/models/pricing.rb', line 184 def price_unit @price_unit end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
184 185 186 |
# File 'lib/voiceml/models/pricing.rb', line 184 def url @url end |
Class Method Details
.from_hash(h) ⇒ Object
197 |
# File 'lib/voiceml/models/pricing.rb', line 197 def self.from_hash(h); h.nil? ? nil : new(h); end |