Class: SDM::ResourceUpdateResponse

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

Overview

ResourceUpdateResponse returns the fields of a Resource after it has been updated by a ResourceUpdateRequest.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(meta: nil, rate_limit: nil, resource: nil) ⇒ ResourceUpdateResponse



5294
5295
5296
5297
5298
5299
5300
5301
5302
# File 'lib/models/porcelain.rb', line 5294

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

Instance Attribute Details

#metaObject

Reserved for future use.



5288
5289
5290
# File 'lib/models/porcelain.rb', line 5288

def meta
  @meta
end

#rate_limitObject

Rate limit information.



5290
5291
5292
# File 'lib/models/porcelain.rb', line 5290

def rate_limit
  @rate_limit
end

#resourceObject

The updated Resource.



5292
5293
5294
# File 'lib/models/porcelain.rb', line 5292

def resource
  @resource
end

Instance Method Details

#to_json(options = {}) ⇒ Object



5304
5305
5306
5307
5308
5309
5310
# File 'lib/models/porcelain.rb', line 5304

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