Class: VoiceML::IncomingPhoneNumberList
- Inherits:
-
Object
- Object
- VoiceML::IncomingPhoneNumberList
- Includes:
- Pageable
- Defined in:
- lib/voiceml/models/incoming_phone_numbers.rb
Overview
Paginated ‘GET /IncomingPhoneNumbers` response. Same envelope shape as `CallList`.
Constant Summary
Constants included from Pageable
Instance Attribute Summary collapse
-
#incoming_phone_numbers ⇒ Object
readonly
Returns the value of attribute incoming_phone_numbers.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ IncomingPhoneNumberList
constructor
A new instance of IncomingPhoneNumberList.
Methods included from Pageable
Constructor Details
#initialize(hash = {}) ⇒ IncomingPhoneNumberList
Returns a new instance of IncomingPhoneNumberList.
49 50 51 52 53 |
# File 'lib/voiceml/models/incoming_phone_numbers.rb', line 49 def initialize(hash = {}) assign_page_fields(hash) @incoming_phone_numbers = (hash['incoming_phone_numbers'] || []).map { |n| IncomingPhoneNumber.from_hash(n) } end |
Instance Attribute Details
#incoming_phone_numbers ⇒ Object (readonly)
Returns the value of attribute incoming_phone_numbers.
47 48 49 |
# File 'lib/voiceml/models/incoming_phone_numbers.rb', line 47 def incoming_phone_numbers @incoming_phone_numbers end |
Class Method Details
.from_hash(hash) ⇒ Object
55 56 57 |
# File 'lib/voiceml/models/incoming_phone_numbers.rb', line 55 def self.from_hash(hash) new(hash || {}) end |