Class: VoiceML::PricingVoiceNumber
- Inherits:
-
Object
- Object
- VoiceML::PricingVoiceNumber
- Defined in:
- lib/voiceml/models/pricing.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#inbound_call_price ⇒ Object
readonly
Returns the value of attribute inbound_call_price.
-
#iso_country ⇒ Object
readonly
Returns the value of attribute iso_country.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#outbound_call_price ⇒ Object
readonly
Returns the value of attribute outbound_call_price.
-
#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 = {}) ⇒ PricingVoiceNumber
constructor
A new instance of PricingVoiceNumber.
Constructor Details
#initialize(attrs = {}) ⇒ PricingVoiceNumber
Returns a new instance of PricingVoiceNumber.
126 127 128 129 130 131 132 133 134 |
# File 'lib/voiceml/models/pricing.rb', line 126 def initialize(attrs = {}) @number = attrs['number'] || attrs[:number] @country = attrs['country'] || attrs[:country] @iso_country = attrs['iso_country'] || attrs[:iso_country] @outbound_call_price = PricingOutboundCallPrice.from_hash(attrs['outbound_call_price']) @inbound_call_price = PricingInboundCallPrice.from_hash(attrs['inbound_call_price']) @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.
125 126 127 |
# File 'lib/voiceml/models/pricing.rb', line 125 def country @country end |
#inbound_call_price ⇒ Object (readonly)
Returns the value of attribute inbound_call_price.
125 126 127 |
# File 'lib/voiceml/models/pricing.rb', line 125 def inbound_call_price @inbound_call_price end |
#iso_country ⇒ Object (readonly)
Returns the value of attribute iso_country.
125 126 127 |
# File 'lib/voiceml/models/pricing.rb', line 125 def iso_country @iso_country end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
125 126 127 |
# File 'lib/voiceml/models/pricing.rb', line 125 def number @number end |
#outbound_call_price ⇒ Object (readonly)
Returns the value of attribute outbound_call_price.
125 126 127 |
# File 'lib/voiceml/models/pricing.rb', line 125 def outbound_call_price @outbound_call_price end |
#price_unit ⇒ Object (readonly)
Returns the value of attribute price_unit.
125 126 127 |
# File 'lib/voiceml/models/pricing.rb', line 125 def price_unit @price_unit end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
125 126 127 |
# File 'lib/voiceml/models/pricing.rb', line 125 def url @url end |
Class Method Details
.from_hash(h) ⇒ Object
135 |
# File 'lib/voiceml/models/pricing.rb', line 135 def self.from_hash(h); h.nil? ? nil : new(h); end |