Class: Twilio::REST::Messaging::V2::ChannelsSenderList::MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/messaging/v2/channels_sender.rb,
lib/twilio-ruby/rest/messaging/v2/channels_sender.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers

Returns a new instance of MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers.



91
92
93
94
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 91

def initialize(payload)
        @phone_number = payload["phone_number"]
        @label = payload["label"]
end

Instance Attribute Details

#labelObject

Parameters:



90
91
92
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 90

def label
  @label
end

#phone_numberObject

Parameters:



90
91
92
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 90

def phone_number
  @phone_number
end

Instance Method Details

#to_json(options = {}) ⇒ Object



95
96
97
98
99
100
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 95

def to_json(options = {})
{
        "phone_number": @phone_number,
        "label": @label,
}.to_json(options)
end