Class: Razorpay::Stakeholder
- Inherits:
-
Entity
- Object
- Entity
- Razorpay::Stakeholder
show all
- Defined in:
- lib/razorpay/stakeholder.rb
Overview
Stakeholder API allows you to add stakeholders for an account.
Constant Summary
collapse
- @@versions =
"v2"
Instance Attribute Summary
Attributes inherited from Entity
#attributes
Class 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
.all(account_id) ⇒ Object
22
23
24
|
# File 'lib/razorpay/stakeholder.rb', line 22
def self.all(account_id)
request.get "#{account_id}/stakeholders",{}, @@versions
end
|
.create(account_id, options) ⇒ Object
14
15
16
|
# File 'lib/razorpay/stakeholder.rb', line 14
def self.create(account_id, options)
request.post "#{account_id}/stakeholders", options, @@versions
end
|
.edit(account_id, id, options = {}) ⇒ Object
26
27
28
|
# File 'lib/razorpay/stakeholder.rb', line 26
def self.edit(account_id, id, options = {})
request.patch "#{account_id}/stakeholders/#{id}", options, @@versions
end
|
.fetch(account_id, id) ⇒ Object
18
19
20
|
# File 'lib/razorpay/stakeholder.rb', line 18
def self.fetch(account_id, id)
request.fetch "#{account_id}/stakeholders/#{id}", @@versions
end
|
.fetch_stakeholder_doc(account_id, id) ⇒ Object
35
36
37
|
# File 'lib/razorpay/stakeholder.rb', line 35
def self.fetch_stakeholder_doc(account_id, id)
request.fetch "#{account_id}/stakeholders/#{id}/documents", @@versions
end
|
.request ⇒ Object
10
11
12
|
# File 'lib/razorpay/stakeholder.rb', line 10
def self.request
Razorpay::Request.new('accounts')
end
|
.upload_stakeholder_doc(account_id, id, options) ⇒ Object
30
31
32
33
|
# File 'lib/razorpay/stakeholder.rb', line 30
def self.upload_stakeholder_doc(account_id, id,options)
r = request
r.request :post, "/#{@@versions}/accounts/#{account_id}/stakeholders/#{id}/documents", options
end
|