class Twilio::REST::Trusthub::V1::CustomerProfilesContext

Public Class Methods

new(version, sid) click to toggle source

Initialize the CustomerProfilesContext @param [Version] version Version that contains the resource @param [String] sid The unique string that we created to identify the

Customer-Profile resource.

@return [CustomerProfilesContext] CustomerProfilesContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
205 def initialize(version, sid)
206   super(version)
207 
208   # Path Solution
209   @solution = {sid: sid, }
210   @uri = "/CustomerProfiles/#{@solution[:sid]}"
211 
212   # Dependents
213   @customer_profiles_entity_assignments = nil
214   @customer_profiles_evaluations = nil
215   @customer_profiles_channel_endpoint_assignment = nil
216 end

Public Instance Methods

customer_profiles_channel_endpoint_assignment(sid=:unset) click to toggle source

Access the customer_profiles_channel_endpoint_assignment @return [CustomerProfilesChannelEndpointAssignmentList] @return [CustomerProfilesChannelEndpointAssignmentContext] if sid was passed.

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
304 def customer_profiles_channel_endpoint_assignment(sid=:unset)
305   raise ArgumentError, 'sid cannot be nil' if sid.nil?
306 
307   if sid != :unset
308     return CustomerProfilesChannelEndpointAssignmentContext.new(@version, @solution[:sid], sid, )
309   end
310 
311   unless @customer_profiles_channel_endpoint_assignment
312     @customer_profiles_channel_endpoint_assignment = CustomerProfilesChannelEndpointAssignmentList.new(
313         @version,
314         customer_profile_sid: @solution[:sid],
315     )
316   end
317 
318   @customer_profiles_channel_endpoint_assignment
319 end
customer_profiles_entity_assignments(sid=:unset) click to toggle source

Access the customer_profiles_entity_assignments @return [CustomerProfilesEntityAssignmentsList] @return [CustomerProfilesEntityAssignmentsContext] if sid was passed.

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
262 def customer_profiles_entity_assignments(sid=:unset)
263   raise ArgumentError, 'sid cannot be nil' if sid.nil?
264 
265   if sid != :unset
266     return CustomerProfilesEntityAssignmentsContext.new(@version, @solution[:sid], sid, )
267   end
268 
269   unless @customer_profiles_entity_assignments
270     @customer_profiles_entity_assignments = CustomerProfilesEntityAssignmentsList.new(
271         @version,
272         customer_profile_sid: @solution[:sid],
273     )
274   end
275 
276   @customer_profiles_entity_assignments
277 end
customer_profiles_evaluations(sid=:unset) click to toggle source

Access the customer_profiles_evaluations @return [CustomerProfilesEvaluationsList] @return [CustomerProfilesEvaluationsContext] if sid was passed.

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
283 def customer_profiles_evaluations(sid=:unset)
284   raise ArgumentError, 'sid cannot be nil' if sid.nil?
285 
286   if sid != :unset
287     return CustomerProfilesEvaluationsContext.new(@version, @solution[:sid], sid, )
288   end
289 
290   unless @customer_profiles_evaluations
291     @customer_profiles_evaluations = CustomerProfilesEvaluationsList.new(
292         @version,
293         customer_profile_sid: @solution[:sid],
294     )
295   end
296 
297   @customer_profiles_evaluations
298 end
delete() click to toggle source

Delete the CustomerProfilesInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
254 def delete
255    @version.delete('DELETE', @uri)
256 end
fetch() click to toggle source

Fetch the CustomerProfilesInstance @return [CustomerProfilesInstance] Fetched CustomerProfilesInstance

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
221 def fetch
222   payload = @version.fetch('GET', @uri)
223 
224   CustomerProfilesInstance.new(@version, payload, sid: @solution[:sid], )
225 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
330 def inspect
331   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
332   "#<Twilio.Trusthub.V1.CustomerProfilesContext #{context}>"
333 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
323 def to_s
324   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
325   "#<Twilio.Trusthub.V1.CustomerProfilesContext #{context}>"
326 end
update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) click to toggle source

Update the CustomerProfilesInstance @param [customer_profiles.Status] status The verification status of the

Customer-Profile resource.

@param [String] status_callback The URL we call to inform your application of

status changes.

@param [String] friendly_name The string that you assigned to describe the

resource.

@param [String] email The email address that will receive updates when the

Customer-Profile resource changes status.

@return [CustomerProfilesInstance] Updated CustomerProfilesInstance

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
238 def update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset)
239   data = Twilio::Values.of({
240       'Status' => status,
241       'StatusCallback' => status_callback,
242       'FriendlyName' => friendly_name,
243       'Email' => email,
244   })
245 
246   payload = @version.update('POST', @uri, data: data)
247 
248   CustomerProfilesInstance.new(@version, payload, sid: @solution[:sid], )
249 end