Class: Xendit::Invoice

Inherits:
Object
  • Object
show all
Defined in:
lib/xendit/resources/invoice.rb

Class Method Summary collapse

Class Method Details

.create(**opts) ⇒ Object



10
11
12
# File 'lib/xendit/resources/invoice.rb', line 10

def create(**opts)
  ApiClient.post "v2/invoices/", opts
end

.expire(invoice_id, **opts) ⇒ Object



14
15
16
# File 'lib/xendit/resources/invoice.rb', line 14

def expire(invoice_id, **opts)
  ApiClient.post "invoices/#{invoice_id}/expire!", opts
end

.get(invoice_id, **opts) ⇒ Object



6
7
8
# File 'lib/xendit/resources/invoice.rb', line 6

def get(invoice_id, **opts)
  ApiClient.get "v2/invoices/#{invoice_id}", opts
end

.get_all(**opts) ⇒ Object



18
19
20
# File 'lib/xendit/resources/invoice.rb', line 18

def get_all(**opts)
  ApiClient.get "v2/invoices", opts
end