class Twilio::REST::Numbers::V2::RegulatoryComplianceList::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/numbers/v2/regulatory_compliance/supporting_document_type.rb
190 def initialize(version, payload, sid: nil)
191   super(version)
192 
193   # Marshaled Properties
194   @properties = {
195       'sid' => payload['sid'],
196       'friendly_name' => payload['friendly_name'],
197       'machine_name' => payload['machine_name'],
198       'fields' => payload['fields'],
199       'url' => payload['url'],
200   }
201 
202   # Context
203   @instance_context = nil
204   @params = {'sid' => sid || @properties['sid'], }
205 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/numbers/v2/regulatory_compliance/supporting_document_type.rb
211 def context
212   unless @instance_context
213     @instance_context = SupportingDocumentTypeContext.new(@version, @params['sid'], )
214   end
215   @instance_context
216 end
fetch() click to toggle source

Fetch the SupportingDocumentTypeInstance @return [SupportingDocumentTypeInstance] Fetched SupportingDocumentTypeInstance

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb
251 def fetch
252   context.fetch
253 end
fields() click to toggle source

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

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

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

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

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb
264 def inspect
265   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
266   "<Twilio.Numbers.V2.SupportingDocumentTypeInstance #{values}>"
267 end
machine_name() click to toggle source

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

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

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

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

Provide a user friendly representation

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb
257 def to_s
258   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
259   "<Twilio.Numbers.V2.SupportingDocumentTypeInstance #{values}>"
260 end
url() click to toggle source

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

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb
244 def url
245   @properties['url']
246 end