Class: Razorpay::VirtualAccount
- Inherits:
-
Entity
- Object
- Entity
- Razorpay::VirtualAccount
show all
- Defined in:
- lib/razorpay/virtual_account.rb
Overview
Virtual Account API allows you to create and manage virtual accounts with Razorpay
Instance Attribute Summary
Attributes inherited from Entity
#attributes
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Entity
#initialize, #method_missing, #respond_to_missing?, #to_json, #with_a_bang
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Razorpay::Entity
Class Method Details
.add_receiver(id, options = {}) ⇒ Object
37
38
39
|
# File 'lib/razorpay/virtual_account.rb', line 37
def self.add_receiver(id, options = {})
request.post "#{id}/receivers", options
end
|
.all(options = {}) ⇒ Object
20
21
22
|
# File 'lib/razorpay/virtual_account.rb', line 20
def self.all(options = {})
request.all options
end
|
.allowed_payer(id, options = {}) ⇒ Object
41
42
43
|
# File 'lib/razorpay/virtual_account.rb', line 41
def self.allowed_payer(id, options = {})
request.post "#{id}/allowed_payers", options
end
|
.close(id) ⇒ Object
24
25
26
|
# File 'lib/razorpay/virtual_account.rb', line 24
def self.close(id)
request.post "#{id}/close"
end
|
.create(options) ⇒ Object
12
13
14
|
# File 'lib/razorpay/virtual_account.rb', line 12
def self.create(options)
request.create options
end
|
.delete_allowed_payer(id, payer_id) ⇒ Object
45
46
47
|
# File 'lib/razorpay/virtual_account.rb', line 45
def self.delete_allowed_payer(id, payer_id)
request.delete "#{id}/allowed_payers/#{payer_id}"
end
|
.fetch(id) ⇒ Object
16
17
18
|
# File 'lib/razorpay/virtual_account.rb', line 16
def self.fetch(id)
request.fetch id
end
|
.request ⇒ Object
8
9
10
|
# File 'lib/razorpay/virtual_account.rb', line 8
def self.request
Razorpay::Request.new('virtual_accounts')
end
|
Instance Method Details
#close! ⇒ Object
28
29
30
|
# File 'lib/razorpay/virtual_account.rb', line 28
def close!
with_a_bang { close }
end
|
#payments(options = {}) ⇒ Object
32
33
34
35
|
# File 'lib/razorpay/virtual_account.rb', line 32
def payments(options = {})
r = self.class.request
r.request :get, "/virtual_accounts/#{id}/payments", options
end
|