Class: Twilio::REST::Trusthub::V1::ComplianceInquiriesInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, customer_id: nil) ⇒ ComplianceInquiriesInstance

Initialize the ComplianceInquiriesInstance

Parameters:

  • Version that contains the resource

  • payload that contains response from Twilio

  • The SID of the Account that created this ComplianceInquiries resource.

  • The SID of the Call resource to fetch.



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 354

def initialize(version, payload , customer_id: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'inquiry_id' => payload['inquiry_id'],
        'inquiry_session_token' => payload['inquiry_session_token'],
        'customer_id' => payload['customer_id'],
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = { 'customer_id' => customer_id  || @properties['customer_id']  , }
end

Instance Method Details

#contextComplianceInquiriesContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:

  • CallContext for this CallInstance



375
376
377
378
379
380
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 375

def context
    unless @instance_context
        @instance_context = ComplianceInquiriesContext.new(@version , @params['customer_id'])
    end
    @instance_context
end

#customer_idString

Returns The CustomerID matching the Customer Profile that should be resumed or resubmitted for editing.

Returns:

  • The CustomerID matching the Customer Profile that should be resumed or resubmitted for editing.



396
397
398
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 396

def customer_id
    @properties['customer_id']
end

#inquiry_idString

Returns The unique ID used to start an embedded compliance registration session.

Returns:

  • The unique ID used to start an embedded compliance registration session.



384
385
386
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 384

def inquiry_id
    @properties['inquiry_id']
end

#inquiry_session_tokenString

Returns The session token used to start an embedded compliance registration session.

Returns:

  • The session token used to start an embedded compliance registration session.



390
391
392
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 390

def inquiry_session_token
    @properties['inquiry_session_token']
end

#inspectObject

Provide a detailed, user friendly representation



431
432
433
434
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 431

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Trusthub.V1.ComplianceInquiriesInstance #{values}>"
end

#to_sObject

Provide a user friendly representation



424
425
426
427
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 424

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Trusthub.V1.ComplianceInquiriesInstance #{values}>"
end

#update(primary_profile_sid: nil, theme_set_id: :unset) ⇒ ComplianceInquiriesInstance

Update the ComplianceInquiriesInstance

Parameters:

  • (defaults to: nil)

    The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile.

  • (defaults to: :unset)

    Theme id for styling the inquiry form.

Returns:

  • Updated ComplianceInquiriesInstance



411
412
413
414
415
416
417
418
419
420
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 411

def update(
    primary_profile_sid: nil, 
    theme_set_id: :unset
)

    context.update(
        primary_profile_sid: primary_profile_sid, 
        theme_set_id: theme_set_id, 
    )
end

#urlString

Returns The URL of this resource.

Returns:

  • The URL of this resource.



402
403
404
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 402

def url
    @properties['url']
end