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



1070
1071
1072
1073
1074
1075
1076
1077
1078
# File 'lib/models/porcelain.rb', line 1070

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.



1064
1065
1066
# File 'lib/models/porcelain.rb', line 1064

def 
  @account
end

#metaObject

Reserved for future use.



1066
1067
1068
# File 'lib/models/porcelain.rb', line 1066

def meta
  @meta
end

#rate_limitObject

Rate limit information.



1068
1069
1070
# File 'lib/models/porcelain.rb', line 1068

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1080
1081
1082
1083
1084
1085
1086
# File 'lib/models/porcelain.rb', line 1080

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