Class: Twilio::REST::Trusthub::V1::CustomerProfilesContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Trusthub::V1::CustomerProfilesContext
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb,
lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb,
lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb,
lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb
Defined Under Namespace
Classes: CustomerProfilesChannelEndpointAssignmentContext, CustomerProfilesChannelEndpointAssignmentInstance, CustomerProfilesChannelEndpointAssignmentInstanceMetadata, CustomerProfilesChannelEndpointAssignmentList, CustomerProfilesChannelEndpointAssignmentListResponse, CustomerProfilesChannelEndpointAssignmentPage, CustomerProfilesChannelEndpointAssignmentPageMetadata, CustomerProfilesEntityAssignmentsContext, CustomerProfilesEntityAssignmentsInstance, CustomerProfilesEntityAssignmentsInstanceMetadata, CustomerProfilesEntityAssignmentsList, CustomerProfilesEntityAssignmentsListResponse, CustomerProfilesEntityAssignmentsPage, CustomerProfilesEntityAssignmentsPageMetadata, CustomerProfilesEvaluationsContext, CustomerProfilesEvaluationsInstance, CustomerProfilesEvaluationsInstanceMetadata, CustomerProfilesEvaluationsList, CustomerProfilesEvaluationsListResponse, CustomerProfilesEvaluationsPage, CustomerProfilesEvaluationsPageMetadata
Instance Method Summary collapse
-
#customer_profiles_channel_endpoint_assignment(sid = :unset) ⇒ CustomerProfilesChannelEndpointAssignmentList, CustomerProfilesChannelEndpointAssignmentContext
Access the customer_profiles_channel_endpoint_assignment.
-
#customer_profiles_entity_assignments(sid = :unset) ⇒ CustomerProfilesEntityAssignmentsList, CustomerProfilesEntityAssignmentsContext
Access the customer_profiles_entity_assignments.
-
#customer_profiles_evaluations(sid = :unset) ⇒ CustomerProfilesEvaluationsList, CustomerProfilesEvaluationsContext
Access the customer_profiles_evaluations.
-
#delete ⇒ Boolean
Delete the CustomerProfilesInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the CustomerProfilesInstanceMetadata.
-
#fetch ⇒ CustomerProfilesInstance
Fetch the CustomerProfilesInstance.
-
#fetch_with_metadata ⇒ CustomerProfilesInstance
Fetch the CustomerProfilesInstanceMetadata.
-
#initialize(version, sid) ⇒ CustomerProfilesContext
constructor
Initialize the CustomerProfilesContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ CustomerProfilesInstance
Update the CustomerProfilesInstance.
-
#update_with_metadata(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ CustomerProfilesInstance
Update the CustomerProfilesInstanceMetadata.
Constructor Details
#initialize(version, sid) ⇒ CustomerProfilesContext
Initialize the CustomerProfilesContext
257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 257 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/CustomerProfiles/#{@solution[:sid]}" # Dependents @customer_profiles_channel_endpoint_assignment = nil @customer_profiles_entity_assignments = nil @customer_profiles_evaluations = nil end |
Instance Method Details
#customer_profiles_channel_endpoint_assignment(sid = :unset) ⇒ CustomerProfilesChannelEndpointAssignmentList, CustomerProfilesChannelEndpointAssignmentContext
Access the customer_profiles_channel_endpoint_assignment
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 426 def customer_profiles_channel_endpoint_assignment(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return CustomerProfilesChannelEndpointAssignmentContext.new(@version, @solution[:sid],sid ) end unless @customer_profiles_channel_endpoint_assignment @customer_profiles_channel_endpoint_assignment = CustomerProfilesChannelEndpointAssignmentList.new( @version, customer_profile_sid: @solution[:sid], ) end @customer_profiles_channel_endpoint_assignment end |
#customer_profiles_entity_assignments(sid = :unset) ⇒ CustomerProfilesEntityAssignmentsList, CustomerProfilesEntityAssignmentsContext
Access the customer_profiles_entity_assignments
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 445 def customer_profiles_entity_assignments(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return CustomerProfilesEntityAssignmentsContext.new(@version, @solution[:sid],sid ) end unless @customer_profiles_entity_assignments @customer_profiles_entity_assignments = CustomerProfilesEntityAssignmentsList.new( @version, customer_profile_sid: @solution[:sid], ) end @customer_profiles_entity_assignments end |
#customer_profiles_evaluations(sid = :unset) ⇒ CustomerProfilesEvaluationsList, CustomerProfilesEvaluationsContext
Access the customer_profiles_evaluations
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 464 def customer_profiles_evaluations(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return CustomerProfilesEvaluationsContext.new(@version, @solution[:sid],sid ) end unless @customer_profiles_evaluations @customer_profiles_evaluations = CustomerProfilesEvaluationsList.new( @version, customer_profile_sid: @solution[:sid], ) end @customer_profiles_evaluations end |
#delete ⇒ Boolean
Delete the CustomerProfilesInstance
273 274 275 276 277 278 279 280 281 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 273 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#delete_with_metadata ⇒ Boolean
Delete the CustomerProfilesInstanceMetadata
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 286 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) customerProfiles_instance = CustomerProfilesInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) CustomerProfilesInstanceMetadata.new(@version, customerProfiles_instance, response.headers, response.status_code) end |
#fetch ⇒ CustomerProfilesInstance
Fetch the CustomerProfilesInstance
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 305 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) CustomerProfilesInstance.new( @version, payload, sid: @solution[:sid], ) end |
#fetch_with_metadata ⇒ CustomerProfilesInstance
Fetch the CustomerProfilesInstanceMetadata
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 324 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) customer_profiles_instance = CustomerProfilesInstance.new( @version, response.body, sid: @solution[:sid], ) CustomerProfilesInstanceMetadata.new( @version, customer_profiles_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
489 490 491 492 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 489 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.CustomerProfilesContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
482 483 484 485 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 482 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.CustomerProfilesContext #{context}>" end |
#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ CustomerProfilesInstance
Update the CustomerProfilesInstance
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 353 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, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) CustomerProfilesInstance.new( @version, payload, sid: @solution[:sid], ) end |
#update_with_metadata(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ CustomerProfilesInstance
Update the CustomerProfilesInstanceMetadata
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 388 def ( status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset ) data = Twilio::Values.of({ 'Status' => status, 'StatusCallback' => status_callback, 'FriendlyName' => friendly_name, 'Email' => email, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('POST', @uri, data: data, headers: headers) customer_profiles_instance = CustomerProfilesInstance.new( @version, response.body, sid: @solution[:sid], ) CustomerProfilesInstanceMetadata.new( @version, customer_profiles_instance, response.headers, response.status_code ) end |