Class: SDM::NodeUpdateResponse

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

Overview

NodeUpdateResponse returns the fields of a Node after it has been updated by a NodeUpdateRequest.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(meta: nil, node: nil, rate_limit: nil) ⇒ NodeUpdateResponse

Returns a new instance of NodeUpdateResponse.



4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
# File 'lib/models/porcelain.rb', line 4286

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

Instance Attribute Details

#metaObject

Reserved for future use.



4281
4282
4283
# File 'lib/models/porcelain.rb', line 4281

def meta
  @meta
end

#nodeObject

The updated Node.



4283
4284
4285
# File 'lib/models/porcelain.rb', line 4283

def node
  @node
end

#rate_limitObject

Rate limit information.



4285
4286
4287
# File 'lib/models/porcelain.rb', line 4285

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



4303
4304
4305
4306
4307
4308
4309
# File 'lib/models/porcelain.rb', line 4303

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