class JeraPayment::Api::Iugu::Invoice

Constants

BASE_ENDPOINT

Public Class Methods

cancel(id, access_token = nil) click to toggle source
# File lib/jera_payment/api/iugu/invoice.rb, line 34
def self.cancel(id, access_token = nil)
  url = "#{BASE_ENDPOINT}/#{id}/cancel"

  response = put(url, nil, access_token)
end
capture(id, access_token = nil) click to toggle source
# File lib/jera_payment/api/iugu/invoice.rb, line 28
def self.capture(id, access_token = nil)
  url = "#{BASE_ENDPOINT}/#{id}/capture"

  response = post(url, nil, access_token)
end
create(body = {}, access_token = nil) click to toggle source
# File lib/jera_payment/api/iugu/invoice.rb, line 12
def self.create(body = {}, access_token = nil)
  response = post(BASE_ENDPOINT, body, access_token)
end
duplicate(id, body = {}, access_token = nil) click to toggle source
# File lib/jera_payment/api/iugu/invoice.rb, line 22
def self.duplicate(id, body = {}, access_token = nil)
  url = "#{BASE_ENDPOINT}/#{id}/duplicate"

  response = post(url, body, access_token)
end
index(query = nil, access_token = nil) click to toggle source
# File lib/jera_payment/api/iugu/invoice.rb, line 8
def self.index(query = nil, access_token = nil)
  response = get(BASE_ENDPOINT, query, access_token)
end
refund(id, access_token = nil) click to toggle source
# File lib/jera_payment/api/iugu/invoice.rb, line 40
def self.refund(id, access_token = nil)
  url = "#{BASE_ENDPOINT}/#{id}/refund"

  response = post(url, nil, access_token)
end
send_email(id, access_token = nil) click to toggle source
# File lib/jera_payment/api/iugu/invoice.rb, line 46
def self.send_email(id, access_token = nil)
  url = "#{BASE_ENDPOINT}/#{id}/send_email"

  response = post(url, nil, access_token)
end
show(id, access_token = nil) click to toggle source
# File lib/jera_payment/api/iugu/invoice.rb, line 16
def self.show(id, access_token = nil)
  url = "#{BASE_ENDPOINT}/#{id}"

  response = get(url, nil, access_token)
end