Class: Razorpay::Stakeholder

Inherits:
Entity
  • Object
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

Constructor Details

This class inherits a constructor from Razorpay::Entity

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()
  request.get "#{}/stakeholders",{}, @@versions
end

.create(account_id, options) ⇒ Object



14
15
16
# File 'lib/razorpay/stakeholder.rb', line 14

def self.create(, options)
  request.post "#{}/stakeholders", options, @@versions
end

.edit(account_id, id, options = {}) ⇒ Object



26
27
28
# File 'lib/razorpay/stakeholder.rb', line 26

def self.edit(, id, options = {})
  request.patch "#{}/stakeholders/#{id}", options, @@versions
end

.fetch(account_id, id) ⇒ Object



18
19
20
# File 'lib/razorpay/stakeholder.rb', line 18

def self.fetch(, id)
  request.fetch "#{}/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(, id)
  request.fetch "#{}/stakeholders/#{id}/documents", @@versions
end

.requestObject



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(, id,options)
  r = request
  r.request :post, "/#{@@versions}/accounts/#{}/stakeholders/#{id}/documents", options
end