class Twilio::REST::Trusthub::V1::TrustProductsContext

Public Class Methods

new(version, sid) click to toggle source

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

Customer-Profile resource.

@return [TrustProductsContext] TrustProductsContext

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

Public Instance Methods

delete() click to toggle source

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

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

Fetch the TrustProductsInstance @return [TrustProductsInstance] Fetched TrustProductsInstance

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products.rb
221 def fetch
222   payload = @version.fetch('GET', @uri)
223 
224   TrustProductsInstance.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/trust_products.rb
330 def inspect
331   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
332   "#<Twilio.Trusthub.V1.TrustProductsContext #{context}>"
333 end
to_s() click to toggle source

Provide a user friendly representation

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

Access the trust_products_channel_endpoint_assignment @return [TrustProductsChannelEndpointAssignmentList] @return [TrustProductsChannelEndpointAssignmentContext] if sid was passed.

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

Access the trust_products_entity_assignments @return [TrustProductsEntityAssignmentsList] @return [TrustProductsEntityAssignmentsContext] if sid was passed.

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

Access the trust_products_evaluations @return [TrustProductsEvaluationsList] @return [TrustProductsEvaluationsContext] if sid was passed.

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products.rb
283 def trust_products_evaluations(sid=:unset)
284   raise ArgumentError, 'sid cannot be nil' if sid.nil?
285 
286   if sid != :unset
287     return TrustProductsEvaluationsContext.new(@version, @solution[:sid], sid, )
288   end
289 
290   unless @trust_products_evaluations
291     @trust_products_evaluations = TrustProductsEvaluationsList.new(
292         @version,
293         trust_product_sid: @solution[:sid],
294     )
295   end
296 
297   @trust_products_evaluations
298 end
update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) click to toggle source

Update the TrustProductsInstance @param [trust_products.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 [TrustProductsInstance] Updated TrustProductsInstance

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products.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   TrustProductsInstance.new(@version, payload, sid: @solution[:sid], )
249 end