Class: VoiceML::PricingOutboundSMSPrice

Inherits:
Object
  • Object
show all
Defined in:
lib/voiceml/models/pricing.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#carrierObject (readonly)

Returns the value of attribute carrier.



68
69
70
# File 'lib/voiceml/models/pricing.rb', line 68

def carrier
  @carrier
end

#mccObject (readonly)

Returns the value of attribute mcc.



68
69
70
# File 'lib/voiceml/models/pricing.rb', line 68

def mcc
  @mcc
end

#mncObject (readonly)

Returns the value of attribute mnc.



68
69
70
# File 'lib/voiceml/models/pricing.rb', line 68

def mnc
  @mnc
end

#pricesObject (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