class Twilio::REST::Trusthub::V1::SupportingDocumentContext
Public Class Methods
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
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 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 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
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
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 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