Class: PagarMe::Payable

Inherits:
Model show all
Defined in:
lib/pagarme/resources/payable.rb

Constant Summary

Constants inherited from PagarMeObject

PagarMe::PagarMeObject::RESOURCES

Instance Attribute Summary

Attributes inherited from PagarMeObject

#attributes

Instance Method Summary collapse

Methods inherited from Model

all, class_name, #create, create, extract_page_count_or_params, find_by, find_by_id, #save, underscored_class_name, url, #url

Methods inherited from PagarMeObject

#==, #[]=, convert, #empty?, #initialize, #respond_to?, #to_hash, #to_s, #unsaved_attributes

Constructor Details

This class inherits a constructor from PagarMe::PagarMeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PagarMe::PagarMeObject

Instance Method Details

#recipientObject



7
8
9
# File 'lib/pagarme/resources/payable.rb', line 7

def recipient
  @recipient ||= PagarMe::Recipient.find recipient_id
end

#transactionObject



3
4
5
# File 'lib/pagarme/resources/payable.rb', line 3

def transaction
  @transaction ||= PagarMe::Transaction.find transaction_id
end