Class: VoiceML::PricingMessagingCountry
- Inherits:
-
Object
- Object
- VoiceML::PricingMessagingCountry
- Defined in:
- lib/voiceml/models/pricing.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#inbound_sms_prices ⇒ Object
readonly
Returns the value of attribute inbound_sms_prices.
-
#iso_country ⇒ Object
readonly
Returns the value of attribute iso_country.
-
#outbound_sms_prices ⇒ Object
readonly
Returns the value of attribute outbound_sms_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 = {}) ⇒ PricingMessagingCountry
constructor
A new instance of PricingMessagingCountry.
Constructor Details
#initialize(attrs = {}) ⇒ PricingMessagingCountry
Returns a new instance of PricingMessagingCountry.
140 141 142 143 144 145 146 147 148 149 |
# File 'lib/voiceml/models/pricing.rb', line 140 def initialize(attrs = {}) @country = attrs['country'] || attrs[:country] @iso_country = attrs['iso_country'] || attrs[:iso_country] @outbound_sms_prices = (attrs['outbound_sms_prices'] || []).map { |h| PricingOutboundSMSPrice.from_hash(h) } @inbound_sms_prices = (attrs['inbound_sms_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.
139 140 141 |
# File 'lib/voiceml/models/pricing.rb', line 139 def country @country end |
#inbound_sms_prices ⇒ Object (readonly)
Returns the value of attribute inbound_sms_prices.
139 140 141 |
# File 'lib/voiceml/models/pricing.rb', line 139 def inbound_sms_prices @inbound_sms_prices end |
#iso_country ⇒ Object (readonly)
Returns the value of attribute iso_country.
139 140 141 |
# File 'lib/voiceml/models/pricing.rb', line 139 def iso_country @iso_country end |
#outbound_sms_prices ⇒ Object (readonly)
Returns the value of attribute outbound_sms_prices.
139 140 141 |
# File 'lib/voiceml/models/pricing.rb', line 139 def outbound_sms_prices @outbound_sms_prices end |
#price_unit ⇒ Object (readonly)
Returns the value of attribute price_unit.
139 140 141 |
# File 'lib/voiceml/models/pricing.rb', line 139 def price_unit @price_unit end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
139 140 141 |
# File 'lib/voiceml/models/pricing.rb', line 139 def url @url end |
Class Method Details
.from_hash(h) ⇒ Object
150 |
# File 'lib/voiceml/models/pricing.rb', line 150 def self.from_hash(h); h.nil? ? nil : new(h); end |