Class: Iugu::Charge

Inherits:
APIResource show all
Includes:
APICreate
Defined in:
lib/iugu/charge.rb

Instance Attribute Summary

Attributes inherited from Object

#attributes, #errors, #unsaved_attributes

Instance Method Summary collapse

Methods included from APICreate

included

Methods inherited from APIResource

endpoint_url, #is_new?, object_base_uri, object_type, relative_url, url

Methods inherited from Object

#add_accessor, #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

Instance Method Details

#invoiceObject



11
12
13
14
15
# File 'lib/iugu/charge.rb', line 11

def invoice
  return false unless @attributes["invoice_id"]

  Invoice.fetch @attributes["invoice_id"]
end

#successObject



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

def success
  @attributes["success"] || false
end