Class: VoiceML::PricingTrunkingCountry
- Inherits:
-
Object
- Object
- VoiceML::PricingTrunkingCountry
- Defined in:
- lib/voiceml/models/pricing.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#iso_country ⇒ Object
readonly
Returns the value of attribute iso_country.
-
#originating_call_prices ⇒ Object
readonly
Returns the value of attribute originating_call_prices.
-
#price_unit ⇒ Object
readonly
Returns the value of attribute price_unit.
-
#terminating_prefix_prices ⇒ Object
readonly
Returns the value of attribute terminating_prefix_prices.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ PricingTrunkingCountry
constructor
A new instance of PricingTrunkingCountry.
Constructor Details
#initialize(attrs = {}) ⇒ PricingTrunkingCountry
Returns a new instance of PricingTrunkingCountry.
202 203 204 205 206 207 208 209 210 211 |
# File 'lib/voiceml/models/pricing.rb', line 202 def initialize(attrs = {}) @country = attrs['country'] || attrs[:country] @iso_country = attrs['iso_country'] || attrs[:iso_country] @terminating_prefix_prices = (attrs['terminating_prefix_prices'] || []).map { |h| PricingOutboundPrefixPriceWithOrigin.from_hash(h) } @originating_call_prices = (attrs['originating_call_prices'] || []).map { |h| PricingInboundCallPrice.from_hash(h) } @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.
201 202 203 |
# File 'lib/voiceml/models/pricing.rb', line 201 def country @country end |
#iso_country ⇒ Object (readonly)
Returns the value of attribute iso_country.
201 202 203 |
# File 'lib/voiceml/models/pricing.rb', line 201 def iso_country @iso_country end |
#originating_call_prices ⇒ Object (readonly)
Returns the value of attribute originating_call_prices.
201 202 203 |
# File 'lib/voiceml/models/pricing.rb', line 201 def originating_call_prices @originating_call_prices end |
#price_unit ⇒ Object (readonly)
Returns the value of attribute price_unit.
201 202 203 |
# File 'lib/voiceml/models/pricing.rb', line 201 def price_unit @price_unit end |
#terminating_prefix_prices ⇒ Object (readonly)
Returns the value of attribute terminating_prefix_prices.
201 202 203 |
# File 'lib/voiceml/models/pricing.rb', line 201 def terminating_prefix_prices @terminating_prefix_prices end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
201 202 203 |
# File 'lib/voiceml/models/pricing.rb', line 201 def url @url end |
Class Method Details
.from_hash(h) ⇒ Object
212 |
# File 'lib/voiceml/models/pricing.rb', line 212 def self.from_hash(h); h.nil? ? nil : new(h); end |