Class: VoiceML::PricingCountryRef

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

Overview

--- Countries list envelope ----------------------------------------------

Constant Summary collapse

ATTRIBUTES =
%w[country iso_country url].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ PricingCountryRef

Returns a new instance of PricingCountryRef.



92
93
94
# File 'lib/voiceml/models/pricing.rb', line 92

def initialize(attrs = {})
  ATTRIBUTES.each { |f| instance_variable_set("@#{f}", attrs[f] || attrs[f.to_sym]) }
end

Class Method Details

.from_hash(h) ⇒ Object



95
# File 'lib/voiceml/models/pricing.rb', line 95

def self.from_hash(h); h.nil? ? nil : new(h); end