Class: Razorpay::Invoice
Overview
Invoice API allows you to create and manage invoices with 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
.all(options = {}) ⇒ Object
20
21
22
|
# File 'lib/razorpay/invoice.rb', line 20
def self.all(options = {})
request.all options
end
|
.cancel(id) ⇒ Object
32
33
34
|
# File 'lib/razorpay/invoice.rb', line 32
def self.cancel(id)
request.post "#{id}/cancel"
end
|
.create(options) ⇒ Object
12
13
14
|
# File 'lib/razorpay/invoice.rb', line 12
def self.create(options)
request.create options
end
|
.edit(id, options = {}) ⇒ Object
24
25
26
|
# File 'lib/razorpay/invoice.rb', line 24
def self.edit(id, options = {})
request.patch id, options
end
|
.fetch(id) ⇒ Object
16
17
18
|
# File 'lib/razorpay/invoice.rb', line 16
def self.fetch(id)
request.fetch id
end
|
.issue(id) ⇒ Object
28
29
30
|
# File 'lib/razorpay/invoice.rb', line 28
def self.issue(id)
request.post "#{id}/issue"
end
|
.request ⇒ Object
8
9
10
|
# File 'lib/razorpay/invoice.rb', line 8
def self.request
Razorpay::Request.new('invoices')
end
|
Instance Method Details
#cancel ⇒ Object
52
53
54
|
# File 'lib/razorpay/invoice.rb', line 52
def cancel
self.class.cancel id
end
|
#cancel! ⇒ Object
56
57
58
|
# File 'lib/razorpay/invoice.rb', line 56
def cancel!
with_a_bang { cancel }
end
|
#edit(options = {}) ⇒ Object
36
37
38
|
# File 'lib/razorpay/invoice.rb', line 36
def edit(options = {})
self.class.edit id, options
end
|
#edit!(options = {}) ⇒ Object
40
41
42
|
# File 'lib/razorpay/invoice.rb', line 40
def edit!(options = {})
with_a_bang { edit options }
end
|
#issue ⇒ Object
44
45
46
|
# File 'lib/razorpay/invoice.rb', line 44
def issue
self.class.issue id
end
|
#issue! ⇒ Object
48
49
50
|
# File 'lib/razorpay/invoice.rb', line 48
def issue!
with_a_bang { issue }
end
|