Class: Twilio::REST::Trusthub::V1::TrustProductsContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Trusthub::V1::TrustProductsContext
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/trust_products.rb,
lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb,
lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb,
lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb
Defined Under Namespace
Classes: TrustProductsChannelEndpointAssignmentContext, TrustProductsChannelEndpointAssignmentInstance, TrustProductsChannelEndpointAssignmentList, TrustProductsChannelEndpointAssignmentPage, TrustProductsEntityAssignmentsContext, TrustProductsEntityAssignmentsInstance, TrustProductsEntityAssignmentsList, TrustProductsEntityAssignmentsPage, TrustProductsEvaluationsContext, TrustProductsEvaluationsInstance, TrustProductsEvaluationsList, TrustProductsEvaluationsPage
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the TrustProductsInstance.
-
#fetch ⇒ TrustProductsInstance
Fetch the TrustProductsInstance.
-
#initialize(version, sid) ⇒ TrustProductsContext
constructor
Initialize the TrustProductsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#trust_products_channel_endpoint_assignment(sid = :unset) ⇒ TrustProductsChannelEndpointAssignmentList, TrustProductsChannelEndpointAssignmentContext
Access the trust_products_channel_endpoint_assignment.
-
#trust_products_entity_assignments(sid = :unset) ⇒ TrustProductsEntityAssignmentsList, TrustProductsEntityAssignmentsContext
Access the trust_products_entity_assignments.
-
#trust_products_evaluations(sid = :unset) ⇒ TrustProductsEvaluationsList, TrustProductsEvaluationsContext
Access the trust_products_evaluations.
-
#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ TrustProductsInstance
Update the TrustProductsInstance.
Constructor Details
#initialize(version, sid) ⇒ TrustProductsContext
Initialize the TrustProductsContext
205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 205 def initialize(version, sid) super(version) # Path Solution @solution = {sid: sid, } @uri = "/TrustProducts/#{@solution[:sid]}" # Dependents @trust_products_entity_assignments = nil @trust_products_evaluations = nil @trust_products_channel_endpoint_assignment = nil end |
Instance Method Details
#delete ⇒ Boolean
Delete the TrustProductsInstance
254 255 256 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 254 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ TrustProductsInstance
Fetch the TrustProductsInstance
221 222 223 224 225 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 221 def fetch payload = @version.fetch('GET', @uri) TrustProductsInstance.new(@version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
330 331 332 333 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 330 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.TrustProductsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
323 324 325 326 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 323 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.TrustProductsContext #{context}>" end |
#trust_products_channel_endpoint_assignment(sid = :unset) ⇒ TrustProductsChannelEndpointAssignmentList, TrustProductsChannelEndpointAssignmentContext
Access the trust_products_channel_endpoint_assignment
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 304 def trust_products_channel_endpoint_assignment(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return TrustProductsChannelEndpointAssignmentContext.new(@version, @solution[:sid], sid, ) end unless @trust_products_channel_endpoint_assignment @trust_products_channel_endpoint_assignment = TrustProductsChannelEndpointAssignmentList.new( @version, trust_product_sid: @solution[:sid], ) end @trust_products_channel_endpoint_assignment end |
#trust_products_entity_assignments(sid = :unset) ⇒ TrustProductsEntityAssignmentsList, TrustProductsEntityAssignmentsContext
Access the trust_products_entity_assignments
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 262 def trust_products_entity_assignments(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return TrustProductsEntityAssignmentsContext.new(@version, @solution[:sid], sid, ) end unless @trust_products_entity_assignments @trust_products_entity_assignments = TrustProductsEntityAssignmentsList.new( @version, trust_product_sid: @solution[:sid], ) end @trust_products_entity_assignments end |
#trust_products_evaluations(sid = :unset) ⇒ TrustProductsEvaluationsList, TrustProductsEvaluationsContext
Access the trust_products_evaluations
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 283 def trust_products_evaluations(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return TrustProductsEvaluationsContext.new(@version, @solution[:sid], sid, ) end unless @trust_products_evaluations @trust_products_evaluations = TrustProductsEvaluationsList.new( @version, trust_product_sid: @solution[:sid], ) end @trust_products_evaluations end |
#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ TrustProductsInstance
Update the TrustProductsInstance
238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 238 def update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) data = Twilio::Values.of({ 'Status' => status, 'StatusCallback' => status_callback, 'FriendlyName' => friendly_name, 'Email' => email, }) payload = @version.update('POST', @uri, data: data) TrustProductsInstance.new(@version, payload, sid: @solution[:sid], ) end |