Class: Twilio::REST::Accounts::V1::AuthTokenPromotionContext

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ AuthTokenPromotionContext

Initialize the AuthTokenPromotionContext

Parameters:

  • version (Version)

    Version that contains the resource



47
48
49
50
51
52
53
54
55
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 47

def initialize(version)
    super(version)

    # Path Solution
    @solution = {  }
    @uri = "/AuthTokens/Promote"

    
end

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation



78
79
80
81
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 78

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Accounts.V1.AuthTokenPromotionContext #{context}>"
end

#to_sObject

Provide a user friendly representation



71
72
73
74
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 71

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Accounts.V1.AuthTokenPromotionContext #{context}>"
end

#updateAuthTokenPromotionInstance

Update the AuthTokenPromotionInstance

Returns:



59
60
61
62
63
64
65
66
# File 'lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb', line 59

def update

    payload = @version.update('POST', @uri)
    AuthTokenPromotionInstance.new(
        @version,
        payload,
    )
end