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.



1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
# File 'lib/models/porcelain.rb', line 1047

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.



1038
1039
1040
# File 'lib/models/porcelain.rb', line 1038

def 
  @account
end

#metaObject

Reserved for future use.



1040
1041
1042
# File 'lib/models/porcelain.rb', line 1040

def meta
  @meta
end

#rate_limitObject

Rate limit information.



1042
1043
1044
# File 'lib/models/porcelain.rb', line 1042

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.



1045
1046
1047
# File 'lib/models/porcelain.rb', line 1045

def token
  @token
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1059
1060
1061
1062
1063
1064
1065
# File 'lib/models/porcelain.rb', line 1059

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