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



547
548
549
550
551
552
553
554
555
556
557
# File 'lib/models/porcelain.rb', line 547

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

Instance Attribute Details

#accountObject

The created Account.



538
539
540
# File 'lib/models/porcelain.rb', line 538

def 
  @account
end

#metaObject

Reserved for future use.



540
541
542
# File 'lib/models/porcelain.rb', line 540

def meta
  @meta
end

#rate_limitObject

Rate limit information.



542
543
544
# File 'lib/models/porcelain.rb', line 542

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.



545
546
547
# File 'lib/models/porcelain.rb', line 545

def token
  @token
end

Instance Method Details

#to_json(options = {}) ⇒ Object



559
560
561
562
563
564
565
# File 'lib/models/porcelain.rb', line 559

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