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

Returns a new instance of AccountCreateResponse.



809
810
811
812
813
814
815
816
817
818
819
# File 'lib/models/porcelain.rb', line 809

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.



800
801
802
# File 'lib/models/porcelain.rb', line 800

def 
  @account
end

#metaObject

Reserved for future use.



802
803
804
# File 'lib/models/porcelain.rb', line 802

def meta
  @meta
end

#rate_limitObject

Rate limit information.



804
805
806
# File 'lib/models/porcelain.rb', line 804

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.



807
808
809
# File 'lib/models/porcelain.rb', line 807

def token
  @token
end

Instance Method Details

#to_json(options = {}) ⇒ Object



821
822
823
824
825
826
827
# File 'lib/models/porcelain.rb', line 821

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