Class: Twilio::REST::Iam::V1::OAuthAppInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Iam::V1::OAuthAppInstance
- Defined in:
- lib/twilio-ruby/rest/iam/v1/o_auth_app.rb
Instance Method Summary collapse
- #access_token_ttl ⇒ String
-
#code ⇒ String
Twilio-specific error code.
-
#context ⇒ OAuthAppContext
Generate an instance context for the instance, the context is capable of performing various actions.
- #created_by ⇒ String
-
#creator_sid ⇒ String
The unique identifier (SID) of the user who created this OAuth app.
- #date_created ⇒ Time
-
#delete ⇒ Boolean
Delete the OAuthAppInstance.
- #description ⇒ String
- #friendly_name ⇒ String
-
#initialize(version, payload, sid: nil) ⇒ OAuthAppInstance
constructor
Initialize the OAuthAppInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#message ⇒ String
Error message.
-
#more_info ⇒ String
Link to Error Code References.
- #policy ⇒ IamV1OrganizationVendoroauthappPolicy
- #secret ⇒ String
- #sid ⇒ String
- #status ⇒ String
-
#to_s ⇒ Object
Provide a user friendly representation.
- #type ⇒ String
-
#update(iam_v1_account_vendor_oauth_app_update_request: nil) ⇒ OAuthAppInstance
Update the OAuthAppInstance.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ OAuthAppInstance
Initialize the OAuthAppInstance
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 500 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'type' => payload['type'], 'sid' => payload['sid'], 'friendly_name' => payload['friendly_name'], 'description' => payload['description'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'created_by' => payload['created_by'], 'creator_sid' => payload['creator_sid'], 'secret' => payload['secret'], 'status' => payload['status'], 'policy' => payload['policy'], 'access_token_ttl' => payload['access_token_ttl'] == nil ? payload['access_token_ttl'] : payload['access_token_ttl'].to_i, 'code' => payload['code'], 'message' => payload['message'], 'more_info' => payload['more_info'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#access_token_ttl ⇒ String
600 601 602 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 600 def access_token_ttl @properties['access_token_ttl'] end |
#code ⇒ String
Returns Twilio-specific error code.
606 607 608 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 606 def code @properties['code'] end |
#context ⇒ OAuthAppContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
531 532 533 534 535 536 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 531 def context unless @instance_context @instance_context = OAuthAppContext.new(@version , @params['sid']) end @instance_context end |
#created_by ⇒ String
570 571 572 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 570 def created_by @properties['created_by'] end |
#creator_sid ⇒ String
Returns The unique identifier (SID) of the user who created this OAuth app.
576 577 578 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 576 def creator_sid @properties['creator_sid'] end |
#date_created ⇒ Time
564 565 566 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 564 def date_created @properties['date_created'] end |
#delete ⇒ Boolean
Delete the OAuthAppInstance
625 626 627 628 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 625 def delete context.delete end |
#description ⇒ String
558 559 560 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 558 def description @properties['description'] end |
#friendly_name ⇒ String
552 553 554 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 552 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
651 652 653 654 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 651 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Iam.V1.OAuthAppInstance #{values}>" end |
#message ⇒ String
Returns Error message.
612 613 614 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 612 def @properties['message'] end |
#more_info ⇒ String
Returns Link to Error Code References.
618 619 620 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 618 def more_info @properties['more_info'] end |
#policy ⇒ IamV1OrganizationVendoroauthappPolicy
594 595 596 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 594 def policy @properties['policy'] end |
#secret ⇒ String
582 583 584 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 582 def secret @properties['secret'] end |
#sid ⇒ String
546 547 548 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 546 def sid @properties['sid'] end |
#status ⇒ String
588 589 590 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 588 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
644 645 646 647 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 644 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Iam.V1.OAuthAppInstance #{values}>" end |
#type ⇒ String
540 541 542 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 540 def type @properties['type'] end |
#update(iam_v1_account_vendor_oauth_app_update_request: nil) ⇒ OAuthAppInstance
Update the OAuthAppInstance
634 635 636 637 638 639 640 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 634 def update(iam_v1_account_vendor_oauth_app_update_request: nil ) context.update( iam_v1_account_vendor_oauth_app_update_request: iam_v1_account_vendor_oauth_app_update_request, ) end |