Class: Iugu::APIResource

Inherits:
Object
  • Object
show all
Defined in:
lib/iugu/api_resource.rb

Instance Attribute Summary

Attributes inherited from Object

#errors

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Object

#add_accessor, #attributes, #copy, #initialize, #method_missing, #modified_attributes, #set_attributes

Constructor Details

This class inherits a constructor from Iugu::Object

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Iugu::Object

Class Method Details

.url(options = nil) ⇒ Object



3
4
5
# File 'lib/iugu/api_resource.rb', line 3

def self.url(options = nil)
  endpoint_url + self.relative_url(options)
end

Instance Method Details

#is_new?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/iugu/api_resource.rb', line 7

def is_new?
  @attributes['id'].nil?
end