class JeraPayment::Api::Iugu::PaymentMethod

Public Class Methods

create(customer_id, body = {}, access_token = nil) click to toggle source
# File lib/jera_payment/api/iugu/payment_method.rb, line 18
def self.create(customer_id, body = {}, access_token = nil)
  url = "customers/#{customer_id}/payment_methods"

  response = post(url, body, access_token)
end
destroy(customer_id, id, access_token = nil) click to toggle source
# File lib/jera_payment/api/iugu/payment_method.rb, line 30
def self.destroy(customer_id, id, access_token = nil)
  url = "customers/#{customer_id}/payment_methods/#{id}"

  response = delete(url, access_token)
end
index(customer_id, access_token = nil) click to toggle source
# File lib/jera_payment/api/iugu/payment_method.rb, line 6
def self.index(customer_id, access_token = nil)
  url = "customers/#{customer_id}/payment_methods"

  response = get(url, nil, access_token)
end
show(customer_id, id, access_token = nil) click to toggle source
# File lib/jera_payment/api/iugu/payment_method.rb, line 12
def self.show(customer_id, id, access_token = nil)
  url = "customers/#{customer_id}/payment_methods/#{id}"

  response = get(url, nil, access_token)
end
update(customer_id, id, body = {}, access_token = nil) click to toggle source
# File lib/jera_payment/api/iugu/payment_method.rb, line 24
def self.update(customer_id, id, body = {}, access_token = nil)
  url = "customers/#{customer_id}/payment_methods/#{id}"

  response = put(url, body, access_token)
end