class Recurly::Resource
This class represents an object as it exists on the Recurly
servers. It is generated from a response. If you wish to update or change a resource, you need to send a request to the server and get a new Resource
.
Attributes
Public Class Methods
Source
# File lib/recurly/resource.rb, line 45 def initialize(attributes = {}) @attributes = attributes.clone end
Public Instance Methods
Source
# File lib/recurly/resource.rb, line 17 def ==(other_resource) other_resource.is_a?(Recurly::Resource) && attributes == other_resource.attributes end
Source
# File lib/recurly/resource.rb, line 23 def inspect "#<#{self.class.name}:#{object_id}} @attributes=#{attributes}>" end
Hide instance variables to keep from accidental logging
Source
# File lib/recurly/resource.rb, line 31 def to_json raise NoMethodError, "to_json is not implemented for Resources. Please use Resource#attributes" end