Class: Razorpay::Customer
Overview
Customer API allows you to create and fetch customers on Razorpay
Instance Attribute Summary
Attributes inherited from Entity
Class Method Summary collapse
- .all(options = {}) ⇒ Object
- .create(options) ⇒ Object
- .edit(id, options = {}) ⇒ Object
- .fetch(id) ⇒ Object
- .request ⇒ Object
Instance Method Summary collapse
- #deleteToken(tokenId) ⇒ Object
-
#fetchToken(tokenId) ⇒ Object
Fetch specific token.
-
#fetchTokens ⇒ Object
Fetch token by customerId razorpay.com/docs/api/recurring-payments/upi/tokens/#22-fetch-tokens-by-customer-id.
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(options = {}) ⇒ Object
23 24 25 |
# File 'lib/razorpay/customer.rb', line 23 def self.all( = {}) request.all end |
.create(options) ⇒ Object
11 12 13 |
# File 'lib/razorpay/customer.rb', line 11 def self.create() request.create end |
.edit(id, options = {}) ⇒ Object
19 20 21 |
# File 'lib/razorpay/customer.rb', line 19 def self.edit(id, = {}) request.put id, end |
.fetch(id) ⇒ Object
15 16 17 |
# File 'lib/razorpay/customer.rb', line 15 def self.fetch(id) request.fetch id 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
Fetch specific token
34 35 36 |
# File 'lib/razorpay/customer.rb', line 34 def fetchToken(tokenId) self.class.request.get "#{id}/tokens/#{tokenId}" end |
#fetchTokens ⇒ Object
Fetch token by customerId razorpay.com/docs/api/recurring-payments/upi/tokens/#22-fetch-tokens-by-customer-id
29 30 31 |
# File 'lib/razorpay/customer.rb', line 29 def fetchTokens self.class.request.get "#{id}/tokens" end |