Class: Twilio::REST::Accounts::V1::AuthTokenPromotionContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Accounts::V1::AuthTokenPromotionContext
- Defined in:
- lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb
Instance Method Summary collapse
-
#initialize(version) ⇒ AuthTokenPromotionContext
constructor
Initialize the AuthTokenPromotionContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update ⇒ AuthTokenPromotionInstance
Update the AuthTokenPromotionInstance.
-
#update_with_metadata ⇒ AuthTokenPromotionInstance
Update the AuthTokenPromotionInstanceMetadata.
Constructor Details
#initialize(version) ⇒ AuthTokenPromotionContext
Initialize the AuthTokenPromotionContext
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 49 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/AuthTokens/Promote" end |
Instance Method Details
#inspect ⇒ Object
Provide a detailed, user friendly representation
111 112 113 114 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 111 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Accounts.V1.AuthTokenPromotionContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
104 105 106 107 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 104 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Accounts.V1.AuthTokenPromotionContext #{context}>" end |
#update ⇒ AuthTokenPromotionInstance
Update the AuthTokenPromotionInstance
62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 62 def update headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, headers: headers) AuthTokenPromotionInstance.new( @version, payload, ) end |
#update_with_metadata ⇒ AuthTokenPromotionInstance
Update the AuthTokenPromotionInstanceMetadata
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 80 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('POST', @uri, headers: headers) auth_token_promotion_instance = AuthTokenPromotionInstance.new( @version, response.body, ) AuthTokenPromotionInstanceMetadata.new( @version, auth_token_promotion_instance, response.headers, response.status_code ) end |