Class: PagarMe::Transaction
Constant Summary
PagarMeObject::RESOURCES
Instance Attribute Summary
#attributes
Class Method Summary
collapse
Instance Method Summary
collapse
#create, #initialize, #save
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
#==, #[]=, 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
.calculate_installments(params) ⇒ Object
44
45
46
|
# File 'lib/pagarme/resources/transaction.rb', line 44
def calculate_installments(params)
PagarMe::Request.get(url('calculate_installments_amount'), query: params).run
end
|
Instance Method Details
#antifraud_analyses ⇒ Object
9
10
11
|
# File 'lib/pagarme/resources/transaction.rb', line 9
def antifraud_analyses
PagarMe::Request.get( url 'antifraud_analyses' ).call
end
|
#capture(params = {}) ⇒ Object
33
34
35
|
# File 'lib/pagarme/resources/transaction.rb', line 33
def capture(params={})
update PagarMe::Request.post(url('capture'), params: params).run
end
|
#collect_payment(params = {}) ⇒ Object
29
30
31
|
# File 'lib/pagarme/resources/transaction.rb', line 29
def collect_payment(params={})
PagarMe::Request.post(url('collect_payment'), params: params).run
end
|
25
26
27
|
# File 'lib/pagarme/resources/transaction.rb', line 25
def events
PagarMe::Request.get( url 'events' ).call
end
|
#operations ⇒ Object
21
22
23
|
# File 'lib/pagarme/resources/transaction.rb', line 21
def operations
PagarMe::Request.get( url 'operations' ).call
end
|
13
14
15
|
# File 'lib/pagarme/resources/transaction.rb', line 13
def payables
PagarMe::Request.get( url 'payables' ).call
end
|
#postbacks ⇒ Object
17
18
19
|
# File 'lib/pagarme/resources/transaction.rb', line 17
def postbacks
PagarMe::Request.get( url 'postbacks' ).call
end
|
#refund(params = {}) ⇒ Object
37
38
39
|
# File 'lib/pagarme/resources/transaction.rb', line 37
def refund(params={})
update PagarMe::Request.post(url('refund'), params: params).run
end
|
#split_rules ⇒ Object
5
6
7
|
# File 'lib/pagarme/resources/transaction.rb', line 5
def split_rules
PagarMe::Request.get( url 'split_rules' ).call
end
|