Class: Twilio::REST::Trusthub::V1::ComplianceRegistrationInquiriesInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, registration_id: nil) ⇒ ComplianceRegistrationInquiriesInstance

Initialize the ComplianceRegistrationInquiriesInstance

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 ComplianceRegistrationInquiries resource.

  • sid (String)

    The SID of the Call resource to fetch.



280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb', line 280

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

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

Instance Method Details

#contextComplianceRegistrationInquiriesContext

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

Returns:



300
301
302
303
304
305
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb', line 300

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

#inquiry_idString

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.



309
310
311
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb', line 309

def inquiry_id
    @properties['inquiry_id']
end

#inquiry_session_tokenString

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.



315
316
317
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb', line 315

def inquiry_session_token
    @properties['inquiry_session_token']
end

#inspectObject

Provide a detailed, user friendly representation



356
357
358
359
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb', line 356

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

#registration_idString

Returns The RegistrationId matching the Registration Profile that should be resumed or resubmitted for editing.

Returns:

  • (String)

    The RegistrationId matching the Registration Profile that should be resumed or resubmitted for editing.



321
322
323
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb', line 321

def registration_id
    @properties['registration_id']
end

#to_sObject

Provide a user friendly representation



349
350
351
352
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb', line 349

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

#update(is_isv_embed: :unset, theme_set_id: :unset) ⇒ ComplianceRegistrationInquiriesInstance

Update the ComplianceRegistrationInquiriesInstance

Parameters:

  • is_isv_embed (Boolean) (defaults to: :unset)

    Indicates if the inquiry is being started from an ISV embedded component.

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

    Theme id for styling the inquiry form.

Returns:



336
337
338
339
340
341
342
343
344
345
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb', line 336

def update(
    is_isv_embed: :unset, 
    theme_set_id: :unset
)

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

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource.



327
328
329
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb', line 327

def url
    @properties['url']
end