Class: Razorpay::Customer
Overview
Customer API allows you to create and fetch customers on 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_bank_account(id, options = {}) ⇒ Object
42
43
44
|
# File 'lib/razorpay/customer.rb', line 42
def self.add_bank_account(id, options = {})
request.post "#{id}/bank_account", options
end
|
.all(options = {}) ⇒ Object
23
24
25
|
# File 'lib/razorpay/customer.rb', line 23
def self.all(options = {})
request.all options
end
|
.create(options) ⇒ Object
11
12
13
|
# File 'lib/razorpay/customer.rb', line 11
def self.create(options)
request.create options
end
|
.delete_bank_account(id, bankAccountId) ⇒ Object
46
47
48
|
# File 'lib/razorpay/customer.rb', line 46
def self.delete_bank_account(id, bankAccountId)
request.delete "#{id}/bank_account/#{bankAccountId}"
end
|
.edit(id, options = {}) ⇒ Object
19
20
21
|
# File 'lib/razorpay/customer.rb', line 19
def self.edit(id, options = {})
request.put id, options
end
|
.fetch(id) ⇒ Object
15
16
17
|
# File 'lib/razorpay/customer.rb', line 15
def self.fetch(id)
request.fetch id
end
|
.fetch_eligibility(eligibilityId) ⇒ Object
54
55
56
|
# File 'lib/razorpay/customer.rb', line 54
def self.fetch_eligibility(eligibilityId)
request.get "eligibility/#{eligibilityId}"
end
|
.request ⇒ Object
7
8
9
|
# File 'lib/razorpay/customer.rb', line 7
def self.request
Razorpay::Request.new('customers')
end
|
.request_eligibility_check(options = {}) ⇒ Object
50
51
52
|
# File 'lib/razorpay/customer.rb', line 50
def self.request_eligibility_check(options = {})
request.post "eligibility", options
end
|
Instance Method Details
#deleteToken(tokenId) ⇒ Object
38
39
40
|
# File 'lib/razorpay/customer.rb', line 38
def deleteToken(tokenId)
self.class.request.delete "#{id}/tokens/#{tokenId}"
end
|
#fetchToken(tokenId) ⇒ Object
34
35
36
|
# File 'lib/razorpay/customer.rb', line 34
def fetchToken(tokenId)
self.class.request.get "#{id}/tokens/#{tokenId}"
end
|
#fetchTokens ⇒ Object
29
30
31
|
# File 'lib/razorpay/customer.rb', line 29
def fetchTokens
self.class.request.get "#{id}/tokens"
end
|