Class: Twilio::REST::Trusthub::V1::CustomerProfilesInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Trusthub::V1::CustomerProfilesInstance
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Customer-Profile resource.
-
#context ⇒ CustomerProfilesContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#customer_profiles_channel_endpoint_assignment ⇒ customer_profiles_channel_endpoint_assignment
Access the customer_profiles_channel_endpoint_assignment.
-
#customer_profiles_entity_assignments ⇒ customer_profiles_entity_assignments
Access the customer_profiles_entity_assignments.
-
#customer_profiles_evaluations ⇒ customer_profiles_evaluations
Access the customer_profiles_evaluations.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#delete ⇒ Boolean
Delete the CustomerProfilesInstance.
-
#email ⇒ String
The email address that will receive updates when the Customer-Profile resource changes status.
-
#fetch ⇒ CustomerProfilesInstance
Fetch the CustomerProfilesInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, sid: nil) ⇒ CustomerProfilesInstance
constructor
Initialize the CustomerProfilesInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ Hash
The URLs of the Assigned Items of the Customer-Profile resource.
-
#policy_sid ⇒ String
The unique string of a policy that is associated to the Customer-Profile resource.
-
#sid ⇒ String
The unique string that we created to identify the Customer-Profile resource.
- #status ⇒ Status
-
#status_callback ⇒ String
The URL we call to inform your application of status changes.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ CustomerProfilesInstance
Update the CustomerProfilesInstance.
-
#url ⇒ String
The absolute URL of the Customer-Profile resource.
-
#valid_until ⇒ Time
The date and time in GMT in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format when the resource will be valid until.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ CustomerProfilesInstance
Initialize the CustomerProfilesInstance
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 355 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'policy_sid' => payload['policy_sid'], 'friendly_name' => payload['friendly_name'], 'status' => payload['status'], 'valid_until' => Twilio.deserialize_iso8601_datetime(payload['valid_until']), 'email' => payload['email'], 'status_callback' => payload['status_callback'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Customer-Profile resource.
398 399 400 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 398 def account_sid @properties['account_sid'] end |
#context ⇒ CustomerProfilesContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
383 384 385 386 387 388 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 383 def context unless @instance_context @instance_context = CustomerProfilesContext.new(@version , @params['sid']) end @instance_context end |
#customer_profiles_channel_endpoint_assignment ⇒ customer_profiles_channel_endpoint_assignment
Access the customer_profiles_channel_endpoint_assignment
503 504 505 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 503 def customer_profiles_channel_endpoint_assignment context.customer_profiles_channel_endpoint_assignment end |
#customer_profiles_entity_assignments ⇒ customer_profiles_entity_assignments
Access the customer_profiles_entity_assignments
510 511 512 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 510 def customer_profiles_entity_assignments context.customer_profiles_entity_assignments end |
#customer_profiles_evaluations ⇒ customer_profiles_evaluations
Access the customer_profiles_evaluations
517 518 519 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 517 def customer_profiles_evaluations context.customer_profiles_evaluations end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
440 441 442 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 440 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
446 447 448 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 446 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the CustomerProfilesInstance
465 466 467 468 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 465 def delete context.delete end |
#email ⇒ String
Returns The email address that will receive updates when the Customer-Profile resource changes status.
428 429 430 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 428 def email @properties['email'] end |
#fetch ⇒ CustomerProfilesInstance
Fetch the CustomerProfilesInstance
473 474 475 476 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 473 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
410 411 412 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 410 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
530 531 532 533 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 530 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trusthub.V1.CustomerProfilesInstance #{values}>" end |
#links ⇒ Hash
Returns The URLs of the Assigned Items of the Customer-Profile resource.
458 459 460 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 458 def links @properties['links'] end |
#policy_sid ⇒ String
Returns The unique string of a policy that is associated to the Customer-Profile resource.
404 405 406 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 404 def policy_sid @properties['policy_sid'] end |
#sid ⇒ String
Returns The unique string that we created to identify the Customer-Profile resource.
392 393 394 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 392 def sid @properties['sid'] end |
#status ⇒ Status
416 417 418 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 416 def status @properties['status'] end |
#status_callback ⇒ String
Returns The URL we call to inform your application of status changes.
434 435 436 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 434 def status_callback @properties['status_callback'] end |
#to_s ⇒ Object
Provide a user friendly representation
523 524 525 526 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 523 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trusthub.V1.CustomerProfilesInstance #{values}>" end |
#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ CustomerProfilesInstance
Update the CustomerProfilesInstance
485 486 487 488 489 490 491 492 493 494 495 496 497 498 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 485 def update( status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset ) context.update( status: status, status_callback: status_callback, friendly_name: friendly_name, email: email, ) end |
#url ⇒ String
Returns The absolute URL of the Customer-Profile resource.
452 453 454 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 452 def url @properties['url'] end |
#valid_until ⇒ Time
Returns The date and time in GMT in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format when the resource will be valid until.
422 423 424 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 422 def valid_until @properties['valid_until'] end |