Class: VoiceML::PricingPhoneNumberCountry
- Inherits:
-
Object
- Object
- VoiceML::PricingPhoneNumberCountry
- 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.
-
#phone_number_prices ⇒ Object
readonly
Returns the value of attribute phone_number_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 = {}) ⇒ PricingPhoneNumberCountry
constructor
A new instance of PricingPhoneNumberCountry.
Constructor Details
#initialize(attrs = {}) ⇒ PricingPhoneNumberCountry
Returns a new instance of PricingPhoneNumberCountry.
155 156 157 158 159 160 161 162 |
# File 'lib/voiceml/models/pricing.rb', line 155 def initialize(attrs = {}) @country = attrs['country'] || attrs[:country] @iso_country = attrs['iso_country'] || attrs[:iso_country] @phone_number_prices = (attrs['phone_number_prices'] || []).map { |h| PricingPhoneNumberPrice.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.
154 155 156 |
# File 'lib/voiceml/models/pricing.rb', line 154 def country @country end |
#iso_country ⇒ Object (readonly)
Returns the value of attribute iso_country.
154 155 156 |
# File 'lib/voiceml/models/pricing.rb', line 154 def iso_country @iso_country end |
#phone_number_prices ⇒ Object (readonly)
Returns the value of attribute phone_number_prices.
154 155 156 |
# File 'lib/voiceml/models/pricing.rb', line 154 def phone_number_prices @phone_number_prices end |
#price_unit ⇒ Object (readonly)
Returns the value of attribute price_unit.
154 155 156 |
# File 'lib/voiceml/models/pricing.rb', line 154 def price_unit @price_unit end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
154 155 156 |
# File 'lib/voiceml/models/pricing.rb', line 154 def url @url end |
Class Method Details
.from_hash(h) ⇒ Object
163 |
# File 'lib/voiceml/models/pricing.rb', line 163 def self.from_hash(h); h.nil? ? nil : new(h); end |