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.



172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 172

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:



192
193
194
195
196
197
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 192

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:

  • (String)

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



213
214
215
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 213

def customer_id
    @properties['customer_id']
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.



201
202
203
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 201

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.



207
208
209
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 207

def inquiry_session_token
    @properties['inquiry_session_token']
end

#inspectObject

Provide a detailed, user friendly representation



248
249
250
251
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 248

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

#to_sObject

Provide a user friendly representation



241
242
243
244
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 241

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:



228
229
230
231
232
233
234
235
236
237
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 228

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:

  • (String)

    The URL of this resource.



219
220
221
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 219

def url
    @properties['url']
end