class A55::Client::BankSlip

Attributes

client[RW]

Public Class Methods

new(client) click to toggle source
# File lib/a55/client/bank_slip.rb, line 5
def initialize(client)
  self.client = client
  raise A55::MissingAccountIdError unless client.account_id
end

Public Instance Methods

change_due_date(bank_slip_id, new_date) click to toggle source
# File lib/a55/client/bank_slip.rb, line 30
def change_due_date(bank_slip_id, new_date)
  response = client.post("/boleto/#{client.account_id}/#{bank_slip_id}/alterDueDate", {due_date: new_date})
  response.parsed_response
end
download(bank_slip_id) click to toggle source
# File lib/a55/client/bank_slip.rb, line 25
def download(bank_slip_id)
  response = client.get("/boleto/#{client.account_id}/#{bank_slip_id}/pdf")
  response.parsed_response
end
export(options = {}) click to toggle source
# File lib/a55/client/bank_slip.rb, line 20
def export(options = {}) 
  response = client.post("/boleto/#{client.account_id}/export", options)
  response.parsed_response
end
find(id) click to toggle source
# File lib/a55/client/bank_slip.rb, line 10
def find(id)
  response = client.get("/boleto/#{client.account_id}/#{id}")
  response.parsed_response
end
where(options = {}) click to toggle source
# File lib/a55/client/bank_slip.rb, line 15
def where(options = {})
  response = client.post("/boleto/search/#{client.account_id}", options)
  response.parsed_response
end