class Twilio::REST::Trusthub::V1::SupportingDocumentInstance
Public Class Methods
Initialize the SupportingDocumentInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] sid The unique string created by Twilio
to identify the
Supporting Document resource.
@return [SupportingDocumentInstance] SupportingDocumentInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 234 def initialize(version, payload, sid: nil) 235 super(version) 236 237 # Marshaled Properties 238 @properties = { 239 'sid' => payload['sid'], 240 'account_sid' => payload['account_sid'], 241 'friendly_name' => payload['friendly_name'], 242 'mime_type' => payload['mime_type'], 243 'status' => payload['status'], 244 'type' => payload['type'], 245 'attributes' => payload['attributes'], 246 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 247 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 248 'url' => payload['url'], 249 } 250 251 # Context 252 @instance_context = nil 253 @params = {'sid' => sid || @properties['sid'], } 254 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 275 def account_sid 276 @properties['account_sid'] 277 end
@return [Hash] The set of parameters that compose the Supporting Documents resource
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 305 def attributes 306 @properties['attributes'] 307 end
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [SupportingDocumentContext] SupportingDocumentContext
for this SupportingDocumentInstance
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 260 def context 261 unless @instance_context 262 @instance_context = SupportingDocumentContext.new(@version, @params['sid'], ) 263 end 264 @instance_context 265 end
@return [Time] The ISO 8601 date and time in GMT when the resource was created
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 311 def date_created 312 @properties['date_created'] 313 end
@return [Time] The ISO 8601 date and time in GMT when the resource was last updated
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 317 def date_updated 318 @properties['date_updated'] 319 end
Delete the SupportingDocumentInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 348 def delete 349 context.delete 350 end
Fetch the SupportingDocumentInstance
@return [SupportingDocumentInstance] Fetched SupportingDocumentInstance
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 330 def fetch 331 context.fetch 332 end
@return [String] The string that you assigned to describe the resource
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 281 def friendly_name 282 @properties['friendly_name'] 283 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 361 def inspect 362 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 363 "<Twilio.Trusthub.V1.SupportingDocumentInstance #{values}>" 364 end
@return [String] The image type of the file
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 287 def mime_type 288 @properties['mime_type'] 289 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 269 def sid 270 @properties['sid'] 271 end
@return [supporting_document.Status] The verification status of the Supporting Document resource
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 293 def status 294 @properties['status'] 295 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 354 def to_s 355 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 356 "<Twilio.Trusthub.V1.SupportingDocumentInstance #{values}>" 357 end
@return [String] The type of the Supporting Document
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 299 def type 300 @properties['type'] 301 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 341 def update(friendly_name: :unset, attributes: :unset) 342 context.update(friendly_name: friendly_name, attributes: attributes, ) 343 end
@return [String] The absolute URL of the Supporting Document resource
# File lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb 323 def url 324 @properties['url'] 325 end