Class: Twilio::REST::Conversations::V2::ConversationList::ConversationsV2CaptureRule

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

Returns a new instance of ConversationsV2CaptureRule.



46
47
48
49
50
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 46

def initialize(payload)
        @from = payload["from"]
        @to = payload["to"]
        @metadata = payload["metadata"]
end

Instance Attribute Details

#fromObject

Parameters:

  • : (from)
    String

    The from address. Use ‘*` for wildcard to match any from address.

  • : (to)
    String

    The to address. Use ‘*` for wildcard to match any to address.

  • : (metadata)
    Hash<String, String>

    Additional matching criteria for the capture rule. For voice calls, can include ‘callType` (`PSTN`, `SIP`, and similar).



45
46
47
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 45

def from
  @from
end

#metadataObject

Parameters:

  • : (from)
    String

    The from address. Use ‘*` for wildcard to match any from address.

  • : (to)
    String

    The to address. Use ‘*` for wildcard to match any to address.

  • : (metadata)
    Hash<String, String>

    Additional matching criteria for the capture rule. For voice calls, can include ‘callType` (`PSTN`, `SIP`, and similar).



45
46
47
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 45

def 
  @metadata
end

#toObject

Parameters:

  • : (from)
    String

    The from address. Use ‘*` for wildcard to match any from address.

  • : (to)
    String

    The to address. Use ‘*` for wildcard to match any to address.

  • : (metadata)
    Hash<String, String>

    Additional matching criteria for the capture rule. For voice calls, can include ‘callType` (`PSTN`, `SIP`, and similar).



45
46
47
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 45

def to
  @to
end

Instance Method Details

#to_json(options = {}) ⇒ Object



51
52
53
54
55
56
57
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 51

def to_json(options = {})
{
        "from": @from,
        "to": @to,
        "metadata": @metadata,
}.to_json(options)
end