class Twilio::REST::Trusthub::V1::SupportingDocumentContext

Public Class Methods

new(version, sid) click to toggle source

Initialize the SupportingDocumentContext @param [Version] version Version that contains the resource @param [String] sid The unique string created by Twilio to identify the

Supporting Document resource.

@return [SupportingDocumentContext] SupportingDocumentContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb
169 def initialize(version, sid)
170   super(version)
171 
172   # Path Solution
173   @solution = {sid: sid, }
174   @uri = "/SupportingDocuments/#{@solution[:sid]}"
175 end

Public Instance Methods

delete() click to toggle source

Delete the SupportingDocumentInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb
207 def delete
208    @version.delete('DELETE', @uri)
209 end
fetch() click to toggle source

Fetch the SupportingDocumentInstance @return [SupportingDocumentInstance] Fetched SupportingDocumentInstance

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb
180 def fetch
181   payload = @version.fetch('GET', @uri)
182 
183   SupportingDocumentInstance.new(@version, payload, sid: @solution[:sid], )
184 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb
220 def inspect
221   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
222   "#<Twilio.Trusthub.V1.SupportingDocumentContext #{context}>"
223 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb
213 def to_s
214   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
215   "#<Twilio.Trusthub.V1.SupportingDocumentContext #{context}>"
216 end
update(friendly_name: :unset, attributes: :unset) click to toggle source

Update the SupportingDocumentInstance @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

Supporting Document resource which are derived Supporting Document Types.

@return [SupportingDocumentInstance] Updated SupportingDocumentInstance

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb
193 def update(friendly_name: :unset, attributes: :unset)
194   data = Twilio::Values.of({
195       'FriendlyName' => friendly_name,
196       'Attributes' => Twilio.serialize_object(attributes),
197   })
198 
199   payload = @version.update('POST', @uri, data: data)
200 
201   SupportingDocumentInstance.new(@version, payload, sid: @solution[:sid], )
202 end