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

Returns a new instance of AccountCreateResponse.



1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
# File 'lib/models/porcelain.rb', line 1163

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

Instance Attribute Details

#access_keyObject

ID part of the API key.



1150
1151
1152
# File 'lib/models/porcelain.rb', line 1150

def access_key
  @access_key
end

#accountObject

The created Account.



1152
1153
1154
# File 'lib/models/porcelain.rb', line 1152

def 
  @account
end

#metaObject

Reserved for future use.



1154
1155
1156
# File 'lib/models/porcelain.rb', line 1154

def meta
  @meta
end

#rate_limitObject

Rate limit information.



1156
1157
1158
# File 'lib/models/porcelain.rb', line 1156

def rate_limit
  @rate_limit
end

#secret_keyObject

Secret part of the API key.



1158
1159
1160
# File 'lib/models/porcelain.rb', line 1158

def secret_key
  @secret_key
end

#tokenObject

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



1161
1162
1163
# File 'lib/models/porcelain.rb', line 1161

def token
  @token
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1179
1180
1181
1182
1183
1184
1185
# File 'lib/models/porcelain.rb', line 1179

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