Class: Twilio::REST::Api::V2010::AccountContext::NewSigningKeyList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, account_sid: nil) ⇒ NewSigningKeyList

Initialize the NewSigningKeyList

Parameters:

  • version (Version)

    Version that contains the resource

  • account_sid (String) (defaults to: nil)

    A 34 character string that uniquely identifies this resource.


21
22
23
24
25
26
27
# File 'lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb', line 21

def initialize(version, account_sid: nil)
  super(version)

  # Path Solution
  @solution = {account_sid: }
  @uri = "/Accounts/#{@solution[:account_sid]}/SigningKeys.json"
end

Instance Method Details

#create(friendly_name: :unset) ⇒ NewSigningKeyInstance

Create the NewSigningKeyInstance

Parameters:

  • friendly_name (String) (defaults to: :unset)

    A descriptive string that you create to describe the resource. It can be up to 64 characters long.

Returns:


34
35
36
37
38
39
40
# File 'lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb', line 34

def create(friendly_name: :unset)
  data = Twilio::Values.of({'FriendlyName' => friendly_name, })

  payload = @version.create('POST', @uri, data: data)

  NewSigningKeyInstance.new(@version, payload, account_sid: @solution[:account_sid], )
end

#to_sObject

Provide a user friendly representation


44
45
46
# File 'lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb', line 44

def to_s
  '#<Twilio.Api.V2010.NewSigningKeyList>'
end