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.



1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
# File 'lib/models/porcelain.rb', line 1131

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.



1118
1119
1120
# File 'lib/models/porcelain.rb', line 1118

def access_key
  @access_key
end

#accountObject

The created Account.



1120
1121
1122
# File 'lib/models/porcelain.rb', line 1120

def 
  @account
end

#metaObject

Reserved for future use.



1122
1123
1124
# File 'lib/models/porcelain.rb', line 1122

def meta
  @meta
end

#rate_limitObject

Rate limit information.



1124
1125
1126
# File 'lib/models/porcelain.rb', line 1124

def rate_limit
  @rate_limit
end

#secret_keyObject

Secret part of the API key.



1126
1127
1128
# File 'lib/models/porcelain.rb', line 1126

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.



1129
1130
1131
# File 'lib/models/porcelain.rb', line 1129

def token
  @token
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1147
1148
1149
1150
1151
1152
1153
# File 'lib/models/porcelain.rb', line 1147

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