Class: PagarMe::Recipient
- Inherits:
-
Model
show all
- Defined in:
- lib/pagarme/resources/recipient.rb
Constant Summary
PagarMeObject::RESOURCES
Instance Attribute Summary
#attributes
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Model
all, class_name, #create, create, find_by, find_by_id, #save, underscored_class_name, url, #url
#==, #[]=, convert, #empty?, #initialize, #respond_to?, #to_hash, #to_s, #unsaved_attributes
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class PagarMe::PagarMeObject
Class Method Details
28
29
30
|
# File 'lib/pagarme/resources/recipient.rb', line 28
def self.default
Company.default_recipient
end
|
Instance Method Details
#balance_operations(*args) ⇒ Object
#bulk_anticipate(params = Hash.new) ⇒ Object
12
13
14
|
# File 'lib/pagarme/resources/recipient.rb', line 12
def bulk_anticipate(params = Hash.new)
PagarMe::BulkAnticipation.create params.merge(parent_id: id)
end
|
#bulk_anticipations(page = 1, count = 10) ⇒ Object
7
8
9
10
|
# File 'lib/pagarme/resources/recipient.rb', line 7
def bulk_anticipations(page = 1, count = 10)
raise RequestError.new('Invalid page count') if page < 1 or count < 1
PagarMe::BulkAnticipation.all id, page, count
end
|
#bulk_anticipations_limits(params = Hash.new) ⇒ Object
#receive(amount) ⇒ Object
24
25
26
|
# File 'lib/pagarme/resources/recipient.rb', line 24
def receive(amount)
PagarMe::Transfer.create recipient_id: id, amount: amount
end
|