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.



427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
# File 'lib/models/porcelain.rb', line 427

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.



420
421
422
# File 'lib/models/porcelain.rb', line 420

def 
  @account
end

#metaObject

Reserved for future use.



418
419
420
# File 'lib/models/porcelain.rb', line 418

def meta
  @meta
end

#rate_limitObject

Rate limit information.



425
426
427
# File 'lib/models/porcelain.rb', line 425

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.



423
424
425
# File 'lib/models/porcelain.rb', line 423

def token
  @token
end

Instance Method Details

#to_json(options = {}) ⇒ Object



447
448
449
450
451
452
453
# File 'lib/models/porcelain.rb', line 447

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