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.



1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
# File 'lib/models/porcelain.rb', line 1243

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.



1230
1231
1232
# File 'lib/models/porcelain.rb', line 1230

def access_key
  @access_key
end

#accountObject

The created Account.



1232
1233
1234
# File 'lib/models/porcelain.rb', line 1232

def 
  @account
end

#metaObject

Reserved for future use.



1234
1235
1236
# File 'lib/models/porcelain.rb', line 1234

def meta
  @meta
end

#rate_limitObject

Rate limit information.



1236
1237
1238
# File 'lib/models/porcelain.rb', line 1236

def rate_limit
  @rate_limit
end

#secret_keyObject

Secret part of the API key.



1238
1239
1240
# File 'lib/models/porcelain.rb', line 1238

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.



1241
1242
1243
# File 'lib/models/porcelain.rb', line 1241

def token
  @token
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1259
1260
1261
1262
1263
1264
1265
# File 'lib/models/porcelain.rb', line 1259

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