Class: Twilio::REST::Webhooks::V1::AuthProfileInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Webhooks::V1::AuthProfileInstance
- Defined in:
- lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb
Instance Method Summary collapse
-
#audience ⇒ String
OAuth2 audience parameter.
-
#client_credentials_auth_method ⇒ String
Client credentials authentication method (defaults to CLIENT_SECRET_POST).
-
#client_id ⇒ String
OAuth2 client identifier.
-
#client_secret ⇒ String
OAuth2 client secret (never returned, stored securely as secret).
- #code ⇒ String
-
#context ⇒ AuthProfileContext
Generate an instance context for the instance, the context is capable of performing various actions.
- #created_at ⇒ Time
-
#delete ⇒ Boolean
Delete the AuthProfileInstance.
- #detail ⇒ String
-
#fetch ⇒ AuthProfileInstance
Fetch the AuthProfileInstance.
-
#friendly_name ⇒ String
Human-readable name for identification.
-
#id ⇒ String
Unique AuthProfile identifier (TypeID/TTID format).
-
#initialize(version, payload, auth_profile_id: nil) ⇒ AuthProfileInstance
constructor
Initialize the AuthProfileInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#password ⇒ String
Digest auth password (never returned, stored securely as secret).
-
#patch(patch_auth_profile: nil) ⇒ AuthProfileInstance
Patch the AuthProfileInstance.
-
#scope ⇒ String
OAuth2 scope to request.
- #status ⇒ String
- #title ⇒ String
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#token_url ⇒ String
OAuth2 token endpoint URL.
-
#type ⇒ String
Authentication type.
- #updated_at ⇒ Time
-
#username ⇒ String
Digest auth username.
Constructor Details
#initialize(version, payload, auth_profile_id: nil) ⇒ AuthProfileInstance
Initialize the AuthProfileInstance
635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 635 def initialize(version, payload , auth_profile_id: nil) apiV1Version = ApiV1Version.new version.domain, version super(apiV1Version) # Marshaled Properties @properties = { 'id' => payload['id'], 'type' => payload['type'], 'friendly_name' => payload['friendly_name'], 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']), 'updated_at' => Twilio.deserialize_iso8601_datetime(payload['updated_at']), 'token_url' => payload['token_url'], 'client_id' => payload['client_id'], 'client_secret' => payload['client_secret'], 'scope' => payload['scope'], 'audience' => payload['audience'], 'client_credentials_auth_method' => payload['client_credentials_auth_method'], 'username' => payload['username'], 'password' => payload['password'], 'title' => payload['title'], 'status' => payload['status'] == nil ? payload['status'] : payload['status'].to_i, 'detail' => payload['detail'], 'code' => payload['code'] == nil ? payload['code'] : payload['code'].to_i, } # Context @instance_context = nil @params = { 'auth_profile_id' => auth_profile_id || @properties['auth_profile_id'] , } end |
Instance Method Details
#audience ⇒ String
Returns OAuth2 audience parameter.
733 734 735 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 733 def audience @properties['audience'] end |
#client_credentials_auth_method ⇒ String
Returns Client credentials authentication method (defaults to CLIENT_SECRET_POST).
739 740 741 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 739 def client_credentials_auth_method @properties['client_credentials_auth_method'] end |
#client_id ⇒ String
Returns OAuth2 client identifier.
715 716 717 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 715 def client_id @properties['client_id'] end |
#client_secret ⇒ String
Returns OAuth2 client secret (never returned, stored securely as secret).
721 722 723 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 721 def client_secret @properties['client_secret'] end |
#code ⇒ String
775 776 777 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 775 def code @properties['code'] end |
#context ⇒ AuthProfileContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
670 671 672 673 674 675 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 670 def context unless @instance_context @instance_context = AuthProfileContext.new(@version , @params['auth_profile_id']) end @instance_context end |
#created_at ⇒ Time
697 698 699 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 697 def created_at @properties['created_at'] end |
#delete ⇒ Boolean
Delete the AuthProfileInstance
782 783 784 785 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 782 def delete context.delete end |
#detail ⇒ String
769 770 771 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 769 def detail @properties['detail'] end |
#fetch ⇒ AuthProfileInstance
Fetch the AuthProfileInstance
790 791 792 793 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 790 def fetch context.fetch end |
#friendly_name ⇒ String
Returns Human-readable name for identification.
691 692 693 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 691 def friendly_name @properties['friendly_name'] end |
#id ⇒ String
Returns Unique AuthProfile identifier (TypeID/TTID format).
679 680 681 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 679 def id @properties['id'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
816 817 818 819 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 816 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Webhooks.V1.AuthProfileInstance #{values}>" end |
#password ⇒ String
Returns Digest auth password (never returned, stored securely as secret).
751 752 753 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 751 def password @properties['password'] end |
#patch(patch_auth_profile: nil) ⇒ AuthProfileInstance
Patch the AuthProfileInstance
799 800 801 802 803 804 805 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 799 def patch(patch_auth_profile: nil ) context.patch( patch_auth_profile: patch_auth_profile, ) end |
#scope ⇒ String
Returns OAuth2 scope to request.
727 728 729 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 727 def scope @properties['scope'] end |
#status ⇒ String
763 764 765 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 763 def status @properties['status'] end |
#title ⇒ String
757 758 759 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 757 def title @properties['title'] end |
#to_s ⇒ Object
Provide a user friendly representation
809 810 811 812 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 809 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Webhooks.V1.AuthProfileInstance #{values}>" end |
#token_url ⇒ String
Returns OAuth2 token endpoint URL.
709 710 711 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 709 def token_url @properties['token_url'] end |
#type ⇒ String
Returns Authentication type.
685 686 687 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 685 def type @properties['type'] end |
#updated_at ⇒ Time
703 704 705 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 703 def updated_at @properties['updated_at'] end |
#username ⇒ String
Returns Digest auth username.
745 746 747 |
# File 'lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb', line 745 def username @properties['username'] end |