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.



12927
12928
12929
12930
12931
12932
12933
12934
12935
# File 'lib/models/porcelain.rb', line 12927

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

Instance Attribute Details

#meta ⇒ Object

Reserved for future use.



12921
12922
12923
# File 'lib/models/porcelain.rb', line 12921

def meta
  @meta
end

#node ⇒ Object

The updated Node.



12923
12924
12925
# File 'lib/models/porcelain.rb', line 12923

def node
  @node
end

#rate_limit ⇒ Object

Rate limit information.



12925
12926
12927
# File 'lib/models/porcelain.rb', line 12925

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



12937
12938
12939
12940
12941
12942
12943
# File 'lib/models/porcelain.rb', line 12937

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