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.



1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
# File 'lib/models/porcelain.rb', line 1098

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.



1085
1086
1087
# File 'lib/models/porcelain.rb', line 1085

def access_key
  @access_key
end

#accountObject

The created Account.



1087
1088
1089
# File 'lib/models/porcelain.rb', line 1087

def 
  @account
end

#metaObject

Reserved for future use.



1089
1090
1091
# File 'lib/models/porcelain.rb', line 1089

def meta
  @meta
end

#rate_limitObject

Rate limit information.



1091
1092
1093
# File 'lib/models/porcelain.rb', line 1091

def rate_limit
  @rate_limit
end

#secret_keyObject

Secret part of the API key.



1093
1094
1095
# File 'lib/models/porcelain.rb', line 1093

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.



1096
1097
1098
# File 'lib/models/porcelain.rb', line 1096

def token
  @token
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1114
1115
1116
1117
1118
1119
1120
# File 'lib/models/porcelain.rb', line 1114

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