class Twilio::REST::Trusthub::V1::SupportingDocumentTypeInstance

Public Class Methods

new(version, payload, sid: nil) click to toggle source

Initialize the SupportingDocumentTypeInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid The unique string that identifies the Supporting Document

Type resource.

@return [SupportingDocumentTypeInstance] SupportingDocumentTypeInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb
189 def initialize(version, payload, sid: nil)
190   super(version)
191 
192   # Marshaled Properties
193   @properties = {
194       'sid' => payload['sid'],
195       'friendly_name' => payload['friendly_name'],
196       'machine_name' => payload['machine_name'],
197       'fields' => payload['fields'],
198       'url' => payload['url'],
199   }
200 
201   # Context
202   @instance_context = nil
203   @params = {'sid' => sid || @properties['sid'], }
204 end

Public Instance Methods

context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [SupportingDocumentTypeContext] SupportingDocumentTypeContext for this SupportingDocumentTypeInstance

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb
210 def context
211   unless @instance_context
212     @instance_context = SupportingDocumentTypeContext.new(@version, @params['sid'], )
213   end
214   @instance_context
215 end
fetch() click to toggle source

Fetch the SupportingDocumentTypeInstance @return [SupportingDocumentTypeInstance] Fetched SupportingDocumentTypeInstance

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb
250 def fetch
251   context.fetch
252 end
fields() click to toggle source

@return [Array] The required information for creating a Supporting Document

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb
237 def fields
238   @properties['fields']
239 end
friendly_name() click to toggle source

@return [String] A human-readable description of the Supporting Document Type resource

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb
225 def friendly_name
226   @properties['friendly_name']
227 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb
263 def inspect
264   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
265   "<Twilio.Trusthub.V1.SupportingDocumentTypeInstance #{values}>"
266 end
machine_name() click to toggle source

@return [String] The machine-readable description of the Supporting Document Type resource

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb
231 def machine_name
232   @properties['machine_name']
233 end
sid() click to toggle source

@return [String] The unique string that identifies the Supporting Document Type resource

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb
219 def sid
220   @properties['sid']
221 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb
256 def to_s
257   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
258   "<Twilio.Trusthub.V1.SupportingDocumentTypeInstance #{values}>"
259 end
url() click to toggle source

@return [String] The absolute URL of the Supporting Document Type resource

    # File lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb
243 def url
244   @properties['url']
245 end