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(meta: nil, account: nil, token: nil, rate_limit: nil) ⇒ AccountCreateResponse

Returns a new instance of AccountCreateResponse.



404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/models/porcelain.rb', line 404

def initialize(
  meta: nil,
  account: nil,
  token: nil,
  rate_limit: nil
)
  if meta != nil
    @meta = meta
  end
  if  != nil
    @account = 
  end
  if token != nil
    @token = token
  end
  if rate_limit != nil
    @rate_limit = rate_limit
  end
end

Instance Attribute Details

#accountObject

The created Account.



397
398
399
# File 'lib/models/porcelain.rb', line 397

def 
  @account
end

#metaObject

Reserved for future use.



395
396
397
# File 'lib/models/porcelain.rb', line 395

def meta
  @meta
end

#rate_limitObject

Rate limit information.



402
403
404
# File 'lib/models/porcelain.rb', line 402

def rate_limit
  @rate_limit
end

#tokenObject

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



400
401
402
# File 'lib/models/porcelain.rb', line 400

def token
  @token
end

Instance Method Details

#to_json(options = {}) ⇒ Object



424
425
426
427
428
429
430
# File 'lib/models/porcelain.rb', line 424

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