Class: Twilio::REST::Api::V2010::AccountContext::CallContext::UserDefinedMessageList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Api::V2010::AccountContext::CallContext::UserDefinedMessageList
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb
Instance Method Summary collapse
-
#create(content: nil, idempotency_key: :unset) ⇒ UserDefinedMessageInstance
Create the UserDefinedMessageInstance.
-
#initialize(version, account_sid: nil, call_sid: nil) ⇒ UserDefinedMessageList
constructor
Initialize the UserDefinedMessageList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, account_sid: nil, call_sid: nil) ⇒ UserDefinedMessageList
Initialize the UserDefinedMessageList
29 30 31 32 33 34 35 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 29 def initialize(version, account_sid: nil, call_sid: nil) super(version) # Path Solution @solution = { account_sid: account_sid, call_sid: call_sid } @uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/UserDefinedMessages.json" end |
Instance Method Details
#create(content: nil, idempotency_key: :unset) ⇒ UserDefinedMessageInstance
Create the UserDefinedMessageInstance
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 41 def create( content: nil, idempotency_key: :unset ) data = Twilio::Values.of({ 'Content' => content, 'IdempotencyKey' => idempotency_key, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, data: data, headers: headers) UserDefinedMessageInstance.new( @version, payload, account_sid: @solution[:account_sid], call_sid: @solution[:call_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
70 71 72 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 70 def to_s '#<Twilio.Api.V2010.UserDefinedMessageList>' end |