Class: Twilio::REST::Trusthub::V1::TrustProductsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Trusthub::V1::TrustProductsInstance
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/trust_products.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Trust Product resource.
-
#context ⇒ TrustProductsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#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 TrustProductsInstance.
-
#email ⇒ String
The email address that will receive updates when the Trust Product resource changes status.
-
#errors ⇒ Array<Hash>
The error codes associated with the rejection of the Trust Product.
-
#fetch ⇒ TrustProductsInstance
Fetch the TrustProductsInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, sid: nil) ⇒ TrustProductsInstance
constructor
Initialize the TrustProductsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ Hash
The URLs of the Assigned Items of the Trust Product resource.
-
#policy_sid ⇒ String
The unique string of the policy that is associated with the Trust Product resource.
-
#sid ⇒ String
The unique string that we created to identify the Trust Product 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.
-
#trust_products_channel_endpoint_assignment ⇒ trust_products_channel_endpoint_assignment
Access the trust_products_channel_endpoint_assignment.
-
#trust_products_entity_assignments ⇒ trust_products_entity_assignments
Access the trust_products_entity_assignments.
-
#trust_products_evaluations ⇒ trust_products_evaluations
Access the trust_products_evaluations.
-
#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ TrustProductsInstance
Update the TrustProductsInstance.
-
#url ⇒ String
The absolute URL of the Trust Product resource.
-
#valid_until ⇒ Time
The date and time in GMT in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format until which the resource will be valid.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ TrustProductsInstance
Initialize the TrustProductsInstance
649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 649 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'], 'errors' => payload['errors'], } # 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 Trust Product resource.
694 695 696 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 694 def account_sid @properties['account_sid'] end |
#context ⇒ TrustProductsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
679 680 681 682 683 684 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 679 def context unless @instance_context @instance_context = TrustProductsContext.new(@version , @params['sid']) end @instance_context 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.
736 737 738 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 736 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.
742 743 744 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 742 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the TrustProductsInstance
767 768 769 770 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 767 def delete context.delete end |
#email ⇒ String
Returns The email address that will receive updates when the Trust Product resource changes status.
724 725 726 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 724 def email @properties['email'] end |
#errors ⇒ Array<Hash>
Returns The error codes associated with the rejection of the Trust Product.
760 761 762 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 760 def errors @properties['errors'] end |
#fetch ⇒ TrustProductsInstance
Fetch the TrustProductsInstance
775 776 777 778 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 775 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
706 707 708 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 706 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
832 833 834 835 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 832 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trusthub.V1.TrustProductsInstance #{values}>" end |
#links ⇒ Hash
Returns The URLs of the Assigned Items of the Trust Product resource.
754 755 756 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 754 def links @properties['links'] end |
#policy_sid ⇒ String
Returns The unique string of the policy that is associated with the Trust Product resource.
700 701 702 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 700 def policy_sid @properties['policy_sid'] end |
#sid ⇒ String
Returns The unique string that we created to identify the Trust Product resource.
688 689 690 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 688 def sid @properties['sid'] end |
#status ⇒ Status
712 713 714 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 712 def status @properties['status'] end |
#status_callback ⇒ String
Returns The URL we call to inform your application of status changes.
730 731 732 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 730 def status_callback @properties['status_callback'] end |
#to_s ⇒ Object
Provide a user friendly representation
825 826 827 828 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 825 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trusthub.V1.TrustProductsInstance #{values}>" end |
#trust_products_channel_endpoint_assignment ⇒ trust_products_channel_endpoint_assignment
Access the trust_products_channel_endpoint_assignment
805 806 807 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 805 def trust_products_channel_endpoint_assignment context.trust_products_channel_endpoint_assignment end |
#trust_products_entity_assignments ⇒ trust_products_entity_assignments
Access the trust_products_entity_assignments
812 813 814 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 812 def trust_products_entity_assignments context.trust_products_entity_assignments end |
#trust_products_evaluations ⇒ trust_products_evaluations
Access the trust_products_evaluations
819 820 821 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 819 def trust_products_evaluations context.trust_products_evaluations end |
#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ TrustProductsInstance
Update the TrustProductsInstance
787 788 789 790 791 792 793 794 795 796 797 798 799 800 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 787 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 Trust Product resource.
748 749 750 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 748 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 until which the resource will be valid.
718 719 720 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products.rb', line 718 def valid_until @properties['valid_until'] end |