Sha256: 7ed5848fac053092a395e4e306a43a5fc8076c3d25c4dc0e520007741e8d731c
Contents?: true
Size: 926 Bytes
Versions: 5
Compression:
Stored size: 926 Bytes
Contents
module Moip::Assinaturas class Invoice class << self def list(subscription_code) response = Moip::Assinaturas::Client.list_invoices(subscription_code) hash = JSON.load(response.body).with_indifferent_access case response.code when 200 return { success: true, invoices: hash[:invoices] } else raise(WebServerResponseError, "Ocorreu um erro no retorno do webservice") end end def details(id) response = Moip::Assinaturas::Client.details_invoice(id) hash = JSON.load(response.body).with_indifferent_access case response.code when 200 return { success: true, invoice: hash } else raise(WebServerResponseError, "Ocorreu um erro no retorno do webservice") end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems