Class: Twilio::REST::Api::V2010::AccountContext::CallContext::UserDefinedMessageSubscriptionContext

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, account_sid, call_sid, sid) ⇒ UserDefinedMessageSubscriptionContext

Initialize the UserDefinedMessageSubscriptionContext

Parameters:

  • version (Version)

    Version that contains the resource

  • account_sid (String)

    The SID of the [Account](www.twilio.com/docs/iam/api/account) that subscribed to the User Defined Messages.

  • call_sid (String)

    The SID of the [Call](www.twilio.com/docs/voice/api/call-resource) the User Defined Message Subscription is associated with. This refers to the Call SID that is producing the User Defined Messages.

  • sid (String)

    The SID that uniquely identifies this User Defined Message Subscription.



87
88
89
90
91
92
93
94
95
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb', line 87

def initialize(version, , call_sid, sid)
    super(version)

    # Path Solution
    @solution = { account_sid: , call_sid: call_sid, sid: sid,  }
    @uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/UserDefinedMessageSubscriptions/#{@solution[:sid]}.json"

    
end

Instance Method Details

#deleteBoolean

Delete the UserDefinedMessageSubscriptionInstance

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



99
100
101
102
103
104
105
106
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb', line 99

def delete

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    @version.delete('DELETE', @uri, headers: headers)
end

#inspectObject

Provide a detailed, user friendly representation



118
119
120
121
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb', line 118

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Api.V2010.UserDefinedMessageSubscriptionContext #{context}>"
end

#to_sObject

Provide a user friendly representation



111
112
113
114
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb', line 111

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Api.V2010.UserDefinedMessageSubscriptionContext #{context}>"
end