Class: JeraPayment::Api::Iugu::Transfer

Inherits:
Base
  • Object
show all
Defined in:
lib/jera_payment/api/iugu/transfer.rb

Constant Summary collapse

BASE_ENDPOINT =
'transfers'

Class Method Summary collapse

Methods inherited from Base

delete, ensure_account_access_token, get, parse_response, post, put, set_headers

Class Method Details

.create(body = {}, access_token = nil) ⇒ Object



7
8
9
# File 'lib/jera_payment/api/iugu/transfer.rb', line 7

def self.create(body = {}, access_token = nil)
  response = post(BASE_ENDPOINT, body, access_token)
end

.index(query = nil, access_token = nil) ⇒ Object



11
12
13
# File 'lib/jera_payment/api/iugu/transfer.rb', line 11

def self.index(query = nil, access_token = nil)
  response = get(BASE_ENDPOINT, query, access_token)
end

.show(id, access_token = nil) ⇒ Object



15
16
17
18
19
# File 'lib/jera_payment/api/iugu/transfer.rb', line 15

def self.show(id, access_token = nil)
  url = "#{BASE_ENDPOINT}/#{id}"

  response = get(url, nil, access_token)
end