Class: SDM::AccountCreateResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Overview

AccountCreateResponse reports how the Accounts were created in the system.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(access_key: nil, account: nil, meta: nil, rate_limit: nil, secret_key: nil, token: nil) ⇒ AccountCreateResponse

Returns a new instance of AccountCreateResponse.



1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
# File 'lib/models/porcelain.rb', line 1382

def initialize(
  access_key: nil,
  account: nil,
  meta: nil,
  rate_limit: nil,
  secret_key: nil,
  token: nil
)
  @access_key = access_key == nil ? "" : access_key
  @account =  == nil ? nil : 
  @meta = meta == nil ? nil : meta
  @rate_limit = rate_limit == nil ? nil : rate_limit
  @secret_key = secret_key == nil ? "" : secret_key
  @token = token == nil ? "" : token
end

Instance Attribute Details

#access_keyObject

ID part of the API key.



1369
1370
1371
# File 'lib/models/porcelain.rb', line 1369

def access_key
  @access_key
end

#accountObject

The created Account.



1371
1372
1373
# File 'lib/models/porcelain.rb', line 1371

def 
  @account
end

#metaObject

Reserved for future use.



1373
1374
1375
# File 'lib/models/porcelain.rb', line 1373

def meta
  @meta
end

#rate_limitObject

Rate limit information.



1375
1376
1377
# File 'lib/models/porcelain.rb', line 1375

def rate_limit
  @rate_limit
end

#secret_keyObject

Secret part of the API key.



1377
1378
1379
# File 'lib/models/porcelain.rb', line 1377

def secret_key
  @secret_key
end

#tokenObject

The auth token generated for the Account. The Account will use this token to authenticate with the strongDM API.



1380
1381
1382
# File 'lib/models/porcelain.rb', line 1380

def token
  @token
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1398
1399
1400
1401
1402
1403
1404
# File 'lib/models/porcelain.rb', line 1398

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end