Class: Twilio::REST::Api::V2010::AccountContext::NewSigningKeyInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, account_sid: nil) ⇒ NewSigningKeyInstance

Initialize the NewSigningKeyInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String) (defaults to: nil)

    The SID of the Account that created this NewSigningKey resource.

  • sid (String)

    The SID of the Call resource to fetch.



103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb', line 103

def initialize(version, payload , account_sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'friendly_name' => payload['friendly_name'],
        'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
        'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
        'secret' => payload['secret'],
    }
end

Instance Method Details

#date_createdTime

Returns The date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.

Returns:



131
132
133
# File 'lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb', line 131

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.

Returns:



137
138
139
# File 'lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb', line 137

def date_updated
    @properties['date_updated']
end

#friendly_nameString

Returns The string that you assigned to describe the resource.

Returns:

  • (String)

    The string that you assigned to describe the resource.



125
126
127
# File 'lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb', line 125

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



155
156
157
# File 'lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb', line 155

def inspect
    "<Twilio.Api.V2010.NewSigningKeyInstance>"
end

#secretString

Returns The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth ‘password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.**.

Returns:

  • (String)

    The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth ‘password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.**



143
144
145
# File 'lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb', line 143

def secret
    @properties['secret']
end

#sidString

Returns The unique string that that we created to identify the NewSigningKey resource.

Returns:

  • (String)

    The unique string that that we created to identify the NewSigningKey resource.



119
120
121
# File 'lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb', line 119

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



149
150
151
# File 'lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb', line 149

def to_s
    "<Twilio.Api.V2010.NewSigningKeyInstance>"
end