Touggsl - Access Superlogica API through Ruby Code
Até o momento essa gem fornece seis operações sobre a API da Superlogica
- Autenticação
- Cadastro de cliente
- Assinar um plano para um cliente
- Buscar clientes inadimplentes
- Verifica se cliente específico está inadimplente
- Retorna link de 2ª via para um cliente inadimplente
- Retorna todas as cobrancas do cliente, com status pendente por default
- Liquida uma cobrança, dado um ID da cobrança
- Gerar cobrança
Autenticação
Touggsl.set_uri("http://sua_conta.superlogica.net/financeiro/atual/")
@auth = Touggsl::Auth
@auth.login("email", "password")
Criando um cliente
client = Touggsl::Customer.new(@auth)
client.create_new_client("0303030", "Jack", "Tougg", "jack@tougg.com.br") # retorna "200" para sucesso
Vinculando um plano a um cliente
client.hiring_plan(plan_id, client_id, contract_id) #retorna "200" para sucesso.
Buscando inadimplentes
client.get_all_inadimplentes #retorna uma array de Client
Verifica se cliente está inadimplente
client.is_inadimplente(client_id)
2ª Via Boleto
Retorna link de 2ª via, caso cliente estiver inadimplente.
client.link_2via(client_id)
Para maiores informações recomenda-se dar uma olhada nos testes e na documentação.
Contributing to Touggsl
- Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
- Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
- Fork the project.
- Start a feature/bugfix branch.
- Commit and push until you are happy with your contribution.
- Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
- Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Authors
- Édipo Luis Féderle - edipofederle@gmail.com
- Dyan Carlos Carra - dyancarra@gmail.com
Copyright
Copyright (c) 2013 {Tougg}[http://tougg.com.br]. See LICENSE.txt for further details.