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 (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) —

    The SID of the Account that created this ComplianceInquiries resource.

  • sid (String) —

    The SID of the Call resource to fetch.



295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 295

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

#context ⇒ ComplianceInquiriesContext

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

Returns:



316
317
318
319
320
321
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 316

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

#customer_id ⇒ String

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

Returns:

  • (String) —

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



337
338
339
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 337

def customer_id
    @properties['customer_id']
end

#inquiry_id ⇒ String

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

Returns:

  • (String) —

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



325
326
327
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 325

def inquiry_id
    @properties['inquiry_id']
end

#inquiry_session_token ⇒ String

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

Returns:

  • (String) —

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



331
332
333
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 331

def inquiry_session_token
    @properties['inquiry_session_token']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



372
373
374
375
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 372

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

#to_s ⇒ Object

Provide a user friendly representation



365
366
367
368
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 365

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:

  • primary_profile_sid (String) (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.

  • theme_set_id (String) (defaults to: :unset) —

    Theme id for styling the inquiry form.

Returns:



352
353
354
355
356
357
358
359
360
361
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 352

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

#url ⇒ String

Returns The URL of this resource.

Returns:

  • (String) —

    The URL of this resource.



343
344
345
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 343

def url
    @properties['url']
end