Class: Twilio::REST::Conversations::V2::ConversationList::ConversationsV2Address

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ ConversationsV2Address

Returns a new instance of ConversationsV2Address.



27
28
29
30
31
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 27

def initialize(payload)
        @channel = payload["channel"]
        @address = payload["address"]
        @channel_id = payload["channel_id"]
end

Instance Attribute Details

#addressObject

Parameters:

  • : (channel)
    String

    The channel for Communication.

  • : (address)
    String

    The address value formatted according to channel type: - SMS/VOICE: E.164 phone number (such as "+18005550100") - WHATSAPP: Phone number with whatsapp prefix (such as "whatsapp:+18005550100") - RCS: Sender ID or phone number with rcs prefix (such as "rcs:brand_acme_agent" or "rcs:+18005550100") - CHAT: Customer-defined string identifier

  • : (channel_id)
    String

    Channel-specific ID for correlating Communications.



26
27
28
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 26

def address
  @address
end

#channelObject

Parameters:

  • : (channel)
    String

    The channel for Communication.

  • : (address)
    String

    The address value formatted according to channel type: - SMS/VOICE: E.164 phone number (such as "+18005550100") - WHATSAPP: Phone number with whatsapp prefix (such as "whatsapp:+18005550100") - RCS: Sender ID or phone number with rcs prefix (such as "rcs:brand_acme_agent" or "rcs:+18005550100") - CHAT: Customer-defined string identifier

  • : (channel_id)
    String

    Channel-specific ID for correlating Communications.



26
27
28
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 26

def channel
  @channel
end

#channel_idObject

Parameters:

  • : (channel)
    String

    The channel for Communication.

  • : (address)
    String

    The address value formatted according to channel type: - SMS/VOICE: E.164 phone number (such as "+18005550100") - WHATSAPP: Phone number with whatsapp prefix (such as "whatsapp:+18005550100") - RCS: Sender ID or phone number with rcs prefix (such as "rcs:brand_acme_agent" or "rcs:+18005550100") - CHAT: Customer-defined string identifier

  • : (channel_id)
    String

    Channel-specific ID for correlating Communications.



26
27
28
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 26

def channel_id
  @channel_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 32

def to_json(options = {})
{
        "channel": @channel,
        "address": @address,
        "channelId": @channel_id,
}.to_json(options)
end