Class: SDM::AccountAttachmentGetResponse

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

Overview

AccountAttachmentGetResponse returns a requested AccountAttachment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(meta: nil, account_attachment: nil, rate_limit: nil) ⇒ AccountAttachmentGetResponse

Returns a new instance of AccountAttachmentGetResponse.



161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/models/porcelain.rb', line 161

def initialize(
  meta: nil,
  account_attachment: nil,
  rate_limit: nil
)
  if meta != nil
    @meta = meta
  end
  if  != nil
    @account_attachment = 
  end
  if rate_limit != nil
    @rate_limit = rate_limit
  end
end

Instance Attribute Details

#account_attachmentObject

The requested AccountAttachment.



157
158
159
# File 'lib/models/porcelain.rb', line 157

def 
  @account_attachment
end

#metaObject

Reserved for future use.



155
156
157
# File 'lib/models/porcelain.rb', line 155

def meta
  @meta
end

#rate_limitObject

Rate limit information.



159
160
161
# File 'lib/models/porcelain.rb', line 159

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



177
178
179
180
181
182
183
# File 'lib/models/porcelain.rb', line 177

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