Class: SDM::AccountGetResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Overview

AccountGetResponse returns a requested Account.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account: nil, meta: nil, rate_limit: nil) ⇒ AccountGetResponse



1221
1222
1223
1224
1225
1226
1227
1228
1229
# File 'lib/models/porcelain.rb', line 1221

def initialize(
  account: nil,
  meta: nil,
  rate_limit: nil
)
  @account =  == nil ? nil : 
  @meta = meta == nil ? nil : meta
  @rate_limit = rate_limit == nil ? nil : rate_limit
end

Instance Attribute Details

#accountObject

The requested Account.



1215
1216
1217
# File 'lib/models/porcelain.rb', line 1215

def 
  @account
end

#metaObject

Reserved for future use.



1217
1218
1219
# File 'lib/models/porcelain.rb', line 1217

def meta
  @meta
end

#rate_limitObject

Rate limit information.



1219
1220
1221
# File 'lib/models/porcelain.rb', line 1219

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1231
1232
1233
1234
1235
1236
1237
# File 'lib/models/porcelain.rb', line 1231

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