Class: Twilio::REST::Messaging::V2::ChannelsSenderList::MessagingV2ChannelsSenderProfileGenericResponseEmails

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) ⇒ MessagingV2ChannelsSenderProfileGenericResponseEmails

Returns a new instance of MessagingV2ChannelsSenderProfileGenericResponseEmails.



78
79
80
81
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 78

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

Instance Attribute Details

#emailObject

Parameters:



77
78
79
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 77

def email
  @email
end

#labelObject

Parameters:



77
78
79
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 77

def label
  @label
end

Instance Method Details

#to_json(options = {}) ⇒ Object



82
83
84
85
86
87
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 82

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