Class: Twilio::REST::Api::V2010::AccountContext::ConnectAppInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::ConnectAppInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/connect_app.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the ConnectApp resource.
-
#authorize_redirect_url ⇒ String
The URL we redirect the user to after we authenticate the user and obtain authorization to access the Connect App.
-
#company_name ⇒ String
The company name set for the Connect App.
-
#context ⇒ ConnectAppContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#deauthorize_callback_method ⇒ String
The HTTP method we use to call ‘deauthorize_callback_url`.
-
#deauthorize_callback_url ⇒ String
The URL we call using the ‘deauthorize_callback_method` to de-authorize the Connect App.
-
#delete ⇒ Boolean
Delete the ConnectAppInstance.
-
#description ⇒ String
The description of the Connect App.
-
#fetch ⇒ ConnectAppInstance
Fetch the ConnectAppInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#homepage_url ⇒ String
The public URL where users can obtain more information about this Connect App.
-
#initialize(version, payload, account_sid: nil, sid: nil) ⇒ ConnectAppInstance
constructor
Initialize the ConnectAppInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#permissions ⇒ Array<Permission>
The set of permissions that your ConnectApp requests.
-
#sid ⇒ String
The unique string that that we created to identify the ConnectApp resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(authorize_redirect_url: :unset, company_name: :unset, deauthorize_callback_method: :unset, deauthorize_callback_url: :unset, description: :unset, friendly_name: :unset, homepage_url: :unset, permissions: :unset) ⇒ ConnectAppInstance
Update the ConnectAppInstance.
-
#uri ⇒ String
The URI of the resource, relative to ‘api.twilio.com`.
Constructor Details
#initialize(version, payload, account_sid: nil, sid: nil) ⇒ ConnectAppInstance
Initialize the ConnectAppInstance
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 522 def initialize(version, payload , account_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'authorize_redirect_url' => payload['authorize_redirect_url'], 'company_name' => payload['company_name'], 'deauthorize_callback_method' => payload['deauthorize_callback_method'], 'deauthorize_callback_url' => payload['deauthorize_callback_url'], 'description' => payload['description'], 'friendly_name' => payload['friendly_name'], 'homepage_url' => payload['homepage_url'], 'permissions' => payload['permissions'], 'sid' => payload['sid'], 'uri' => payload['uri'], } # Context @instance_context = nil @params = { 'account_sid' => account_sid ,'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 ConnectApp resource.
559 560 561 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 559 def account_sid @properties['account_sid'] end |
#authorize_redirect_url ⇒ String
Returns The URL we redirect the user to after we authenticate the user and obtain authorization to access the Connect App.
565 566 567 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 565 def @properties['authorize_redirect_url'] end |
#company_name ⇒ String
Returns The company name set for the Connect App.
571 572 573 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 571 def company_name @properties['company_name'] end |
#context ⇒ ConnectAppContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
550 551 552 553 554 555 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 550 def context unless @instance_context @instance_context = ConnectAppContext.new(@version , @params['account_sid'], @params['sid']) end @instance_context end |
#deauthorize_callback_method ⇒ String
Returns The HTTP method we use to call ‘deauthorize_callback_url`.
577 578 579 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 577 def @properties['deauthorize_callback_method'] end |
#deauthorize_callback_url ⇒ String
Returns The URL we call using the ‘deauthorize_callback_method` to de-authorize the Connect App.
583 584 585 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 583 def @properties['deauthorize_callback_url'] end |
#delete ⇒ Boolean
Delete the ConnectAppInstance
626 627 628 629 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 626 def delete context.delete end |
#description ⇒ String
Returns The description of the Connect App.
589 590 591 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 589 def description @properties['description'] end |
#fetch ⇒ ConnectAppInstance
Fetch the ConnectAppInstance
634 635 636 637 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 634 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
595 596 597 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 595 def friendly_name @properties['friendly_name'] end |
#homepage_url ⇒ String
Returns The public URL where users can obtain more information about this Connect App.
601 602 603 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 601 def homepage_url @properties['homepage_url'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
682 683 684 685 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 682 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.ConnectAppInstance #{values}>" end |
#permissions ⇒ Array<Permission>
Returns The set of permissions that your ConnectApp requests.
607 608 609 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 607 def @properties['permissions'] end |
#sid ⇒ String
Returns The unique string that that we created to identify the ConnectApp resource.
613 614 615 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 613 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
675 676 677 678 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 675 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.ConnectAppInstance #{values}>" end |
#update(authorize_redirect_url: :unset, company_name: :unset, deauthorize_callback_method: :unset, deauthorize_callback_url: :unset, description: :unset, friendly_name: :unset, homepage_url: :unset, permissions: :unset) ⇒ ConnectAppInstance
Update the ConnectAppInstance
650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 650 def update( authorize_redirect_url: :unset, company_name: :unset, deauthorize_callback_method: :unset, deauthorize_callback_url: :unset, description: :unset, friendly_name: :unset, homepage_url: :unset, permissions: :unset ) context.update( authorize_redirect_url: , company_name: company_name, deauthorize_callback_method: , deauthorize_callback_url: , description: description, friendly_name: friendly_name, homepage_url: homepage_url, permissions: , ) end |
#uri ⇒ String
Returns The URI of the resource, relative to ‘api.twilio.com`.
619 620 621 |
# File 'lib/twilio-ruby/rest/api/v2010/account/connect_app.rb', line 619 def uri @properties['uri'] end |