Method: Twilio::REST::Iam::V1::NewApiKeyInstance#initialize

Defined in:
lib/twilio-ruby/rest/iam/v1/new_api_key.rb

#initialize(version, payload) ⇒ NewApiKeyInstance

Initialize the NewApiKeyInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this NewApiKey resource.

  • sid (String)

    The SID of the Call resource to fetch.



216
217
218
219
220
221
222
223
224
225
226
227
228
229
# File 'lib/twilio-ruby/rest/iam/v1/new_api_key.rb', line 216

def initialize(version, payload )
    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'],
        'policy' => payload['policy'],
    }
end