Class: Twilio::REST::Api::V2010::AccountContext::NewKeyList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Api::V2010::AccountContext::NewKeyList
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/new_key.rb
Instance Method Summary collapse
-
#create(friendly_name: :unset) ⇒ NewKeyInstance
Create the NewKeyInstance.
-
#initialize(version, account_sid: nil) ⇒ NewKeyList
constructor
Initialize the NewKeyList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, account_sid: nil) ⇒ NewKeyList
Initialize the NewKeyList
21 22 23 24 25 26 27 |
# File 'lib/twilio-ruby/rest/api/v2010/account/new_key.rb', line 21 def initialize(version, account_sid: nil) super(version) # Path Solution @solution = {account_sid: account_sid} @uri = "/Accounts/#{@solution[:account_sid]}/Keys.json" end |
Instance Method Details
#create(friendly_name: :unset) ⇒ NewKeyInstance
Create the NewKeyInstance
34 35 36 37 38 39 40 |
# File 'lib/twilio-ruby/rest/api/v2010/account/new_key.rb', line 34 def create(friendly_name: :unset) data = Twilio::Values.of({'FriendlyName' => friendly_name, }) payload = @version.create('POST', @uri, data: data) NewKeyInstance.new(@version, payload, account_sid: @solution[:account_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
44 45 46 |
# File 'lib/twilio-ruby/rest/api/v2010/account/new_key.rb', line 44 def to_s '#<Twilio.Api.V2010.NewKeyList>' end |