Class: Twilio::REST::Pricing::V2::VoiceListResponse
- Inherits:
-
InstanceListResource
- Object
- InstanceListResource
- Twilio::REST::Pricing::V2::VoiceListResponse
- Defined in:
- lib/twilio-ruby/rest/pricing/v2/voice.rb
Instance Method Summary collapse
- #headers ⇒ Object
-
#initialize(version, payload, key, limit = :unset) ⇒ VoiceListResponse
constructor
A new instance of VoiceListResponse.
- #status_code ⇒ Object
- #voice ⇒ Object
Constructor Details
#initialize(version, payload, key, limit = :unset) ⇒ VoiceListResponse
Returns a new instance of VoiceListResponse.
135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/twilio-ruby/rest/pricing/v2/voice.rb', line 135 def initialize(version, payload, key, limit = :unset) data_list = payload.body[key] if limit != :unset data_list = data_list[0, limit] end @voice = data_list.map do |data| VoiceInstance.new(version, data) end @headers = payload.headers @status_code = payload.status_code end |
Instance Method Details
#headers ⇒ Object
151 152 153 |
# File 'lib/twilio-ruby/rest/pricing/v2/voice.rb', line 151 def headers @headers end |
#status_code ⇒ Object
155 156 157 |
# File 'lib/twilio-ruby/rest/pricing/v2/voice.rb', line 155 def status_code @status_code end |
#voice ⇒ Object
147 148 149 |
# File 'lib/twilio-ruby/rest/pricing/v2/voice.rb', line 147 def voice @voice end |