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.



184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/models/porcelain.rb', line 184

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.



180
181
182
# File 'lib/models/porcelain.rb', line 180

def 
  @account_attachment
end

#metaObject

Reserved for future use.



178
179
180
# File 'lib/models/porcelain.rb', line 178

def meta
  @meta
end

#rate_limitObject

Rate limit information.



182
183
184
# File 'lib/models/porcelain.rb', line 182

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



200
201
202
203
204
205
206
# File 'lib/models/porcelain.rb', line 200

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