Module: Razorpay

Defined in:
lib/razorpay.rb,
lib/razorpay/card.rb,
lib/razorpay/plan.rb,
lib/razorpay/addon.rb,
lib/razorpay/order.rb,
lib/razorpay/entity.rb,
lib/razorpay/refund.rb,
lib/razorpay/invoice.rb,
lib/razorpay/payment.rb,
lib/razorpay/request.rb,
lib/razorpay/utility.rb,
lib/razorpay/customer.rb,
lib/razorpay/constants.rb,
lib/razorpay/collection.rb,
lib/razorpay/subscription.rb,
lib/razorpay/virtual_account.rb,
lib/razorpay/errors/server_error.rb,
lib/razorpay/errors/gateway_error.rb,
lib/razorpay/errors/razorpay_error.rb,
lib/razorpay/errors/bad_request_error.rb

Overview

Version and other constants are defined here

Defined Under Namespace

Classes: Addon, BadRequestError, Card, Collection, Customer, Entity, Error, GatewayError, Invoice, Order, Payment, Plan, Refund, Request, ServerError, Subscription, Utility, VirtualAccount

Constant Summary collapse

BASE_URI =
'https://api.razorpay.com/v1/'.freeze
TEST_URL =
'https://api.razorpay.com/'.freeze
VERSION =
'2.4.1'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.authObject

Returns the value of attribute auth.



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

def auth
  @auth
end

.custom_headersObject

Returns the value of attribute custom_headers.



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

def custom_headers
  @custom_headers
end

Class Method Details

.headers=(headers = {}) ⇒ Object



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

def self.headers=(headers = {})
  self.custom_headers = headers
end

.setup(key_id, key_secret) ⇒ Object



22
23
24
# File 'lib/razorpay.rb', line 22

def self.setup(key_id, key_secret)
  self.auth = { username: key_id, password: key_secret }
end