class Twilio::REST::Trusthub::V1::EndUserContext
Public Class Methods
new(version, sid)
click to toggle source
Initialize the EndUserContext
@param [Version] version Version
that contains the resource @param [String] sid The unique string created by Twilio
to identify the End User
resource.
@return [EndUserContext] EndUserContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 170 def initialize(version, sid) 171 super(version) 172 173 # Path Solution 174 @solution = {sid: sid, } 175 @uri = "/EndUsers/#{@solution[:sid]}" 176 end
Public Instance Methods
delete()
click to toggle source
Delete the EndUserInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 208 def delete 209 @version.delete('DELETE', @uri) 210 end
fetch()
click to toggle source
Fetch the EndUserInstance
@return [EndUserInstance] Fetched EndUserInstance
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 181 def fetch 182 payload = @version.fetch('GET', @uri) 183 184 EndUserInstance.new(@version, payload, sid: @solution[:sid], ) 185 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 221 def inspect 222 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 223 "#<Twilio.Trusthub.V1.EndUserContext #{context}>" 224 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 214 def to_s 215 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 216 "#<Twilio.Trusthub.V1.EndUserContext #{context}>" 217 end
update(friendly_name: :unset, attributes: :unset)
click to toggle source
Update the EndUserInstance
@param [String] friendly_name The string that you assigned to describe the
resource.
@param [Hash] attributes The set of parameters that are the attributes of the
End User resource which are derived End User Types.
@return [EndUserInstance] Updated EndUserInstance
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 194 def update(friendly_name: :unset, attributes: :unset) 195 data = Twilio::Values.of({ 196 'FriendlyName' => friendly_name, 197 'Attributes' => Twilio.serialize_object(attributes), 198 }) 199 200 payload = @version.update('POST', @uri, data: data) 201 202 EndUserInstance.new(@version, payload, sid: @solution[:sid], ) 203 end