Class: Razorpay::Order
Overview
Order API allows you to associate Payments with an order entity
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
.all(options = {}) ⇒ Object
20
21
22
|
# File 'lib/razorpay/order.rb', line 20
def self.all(options = {})
request.all options
end
|
.create(options) ⇒ Object
12
13
14
|
# File 'lib/razorpay/order.rb', line 12
def self.create(options)
request.create options
end
|
.edit(id, options = {}) ⇒ Object
29
30
31
|
# File 'lib/razorpay/order.rb', line 29
def self.edit(id, options = {})
request.patch id, options
end
|
.fetch(id) ⇒ Object
16
17
18
|
# File 'lib/razorpay/order.rb', line 16
def self.fetch(id)
request.fetch id
end
|
.fetch_transfer_order(id) ⇒ Object
33
34
35
36
37
|
# File 'lib/razorpay/order.rb', line 33
def self.fetch_transfer_order(id)
request.get "#{id}/?expand[]=transfers&status"
end
|
.request ⇒ Object
8
9
10
|
# File 'lib/razorpay/order.rb', line 8
def self.request
Razorpay::Request.new('orders')
end
|
Instance Method Details
#payments(options = {}) ⇒ Object
24
25
26
27
|
# File 'lib/razorpay/order.rb', line 24
def payments(options = {})
r = self.class.request
r.request :get, "/orders/#{id}/payments", options
end
|