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.



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

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

Instance Attribute Details

#emailObject

Parameters:



74
75
76
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 74

def email
  @email
end

#labelObject

Parameters:



74
75
76
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 74

def label
  @label
end

Instance Method Details

#to_json(options = {}) ⇒ Object



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

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