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

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, account_sid: nil, call_sid: nil) ⇒ UserDefinedMessageInstance

Initialize the UserDefinedMessageInstance

Parameters:

  • version (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) (defaults to: nil) —

    The SID of the Account that created this UserDefinedMessage resource.

  • sid (String) —

    The SID of the Call resource to fetch.



152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 152

def initialize(version, payload , account_sid: nil, call_sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'account_sid' => payload['account_sid'],
        'call_sid' => payload['call_sid'],
        'sid' => payload['sid'],
        'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
    }
end

Instance Method Details

#account_sid ⇒ String

Returns The SID of the Account that created User Defined Message.

Returns:

  • (String) —

    The SID of the Account that created User Defined Message.



168
169
170
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 168

def 
    @properties['account_sid']
end

#call_sid ⇒ String

Returns The SID of the Call the User Defined Message is associated with.

Returns:

  • (String) —

    The SID of the Call the User Defined Message is associated with.



174
175
176
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 174

def call_sid
    @properties['call_sid']
end

#date_created ⇒ Time

Returns The date that this User Defined Message was created, given in RFC 2822 format.

Returns:

  • (Time) —

    The date that this User Defined Message was created, given in RFC 2822 format.



186
187
188
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 186

def date_created
    @properties['date_created']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



198
199
200
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 198

def inspect
    "<Twilio.Api.V2010.UserDefinedMessageInstance>"
end

#sid ⇒ String

Returns The SID that uniquely identifies this User Defined Message.

Returns:

  • (String) —

    The SID that uniquely identifies this User Defined Message.



180
181
182
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 180

def sid
    @properties['sid']
end

#to_s ⇒ Object

Provide a user friendly representation



192
193
194
# File 'lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb', line 192

def to_s
    "<Twilio.Api.V2010.UserDefinedMessageInstance>"
end