Class: VoiceML::PricingOutboundSMSPrice
- Inherits:
-
Object
- Object
- VoiceML::PricingOutboundSMSPrice
- Defined in:
- lib/voiceml/models/pricing.rb
Instance Attribute Summary collapse
-
#carrier ⇒ Object
readonly
Returns the value of attribute carrier.
-
#mcc ⇒ Object
readonly
Returns the value of attribute mcc.
-
#mnc ⇒ Object
readonly
Returns the value of attribute mnc.
-
#prices ⇒ Object
readonly
Returns the value of attribute prices.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ PricingOutboundSMSPrice
constructor
A new instance of PricingOutboundSMSPrice.
Constructor Details
#initialize(attrs = {}) ⇒ PricingOutboundSMSPrice
Returns a new instance of PricingOutboundSMSPrice.
69 70 71 72 73 74 |
# File 'lib/voiceml/models/pricing.rb', line 69 def initialize(attrs = {}) @carrier = attrs['carrier'] || attrs[:carrier] @mcc = attrs['mcc'] || attrs[:mcc] @mnc = attrs['mnc'] || attrs[:mnc] @prices = (attrs['prices'] || attrs[:prices] || []).map { |h| PricingInboundCallPrice.from_hash(h) } end |
Instance Attribute Details
#carrier ⇒ Object (readonly)
Returns the value of attribute carrier.
68 69 70 |
# File 'lib/voiceml/models/pricing.rb', line 68 def carrier @carrier end |
#mcc ⇒ Object (readonly)
Returns the value of attribute mcc.
68 69 70 |
# File 'lib/voiceml/models/pricing.rb', line 68 def mcc @mcc end |
#mnc ⇒ Object (readonly)
Returns the value of attribute mnc.
68 69 70 |
# File 'lib/voiceml/models/pricing.rb', line 68 def mnc @mnc end |
#prices ⇒ Object (readonly)
Returns the value of attribute prices.
68 69 70 |
# File 'lib/voiceml/models/pricing.rb', line 68 def prices @prices end |
Class Method Details
.from_hash(h) ⇒ Object
75 |
# File 'lib/voiceml/models/pricing.rb', line 75 def self.from_hash(h); h.nil? ? nil : new(h); end |