JunoApiIntegration 0.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package JunoApiIntegration --version 0.0.2                
NuGet\Install-Package JunoApiIntegration -Version 0.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JunoApiIntegration" Version="0.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JunoApiIntegration --version 0.0.2                
#r "nuget: JunoApiIntegration, 0.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install JunoApiIntegration as a Cake Addin
#addin nuget:?package=JunoApiIntegration&version=0.0.2

// Install JunoApiIntegration as a Cake Tool
#tool nuget:?package=JunoApiIntegration&version=0.0.2                

juno-api-integration

Api para integração com o Juno

Permite integração com a plataforma Juno para geração de boletos e consulta de cobranças.

Pré-requisitos

Será necessário obter os valores para as seguintes variáveis para execução dos exemplos abaixo:

  • Menu > Integração > Criação de Credencial string _clientId = ""; string _clientSecret = "";

  • Menu > integração > token privado string _privateToken = ""; // token de recurso

Obtendo um token de acesso:

var auth = new JunoAuthorization(_clientId, _clientSecret);
var response = await auth.GenerateTokenAsync();

Verificando o saldo na conta Juno:

var balance = new JunoBalance(tokenResponse.AccessToken, _privateToken);
var balanceResponse = await balance.GetBalanceAsync();

Obter lista de cobranças:

var charge = new JunoCharge(tokenResponse.AccessToken, _privateToken);
var chargeResponse = await charge.GetCharges();

Obter dados de uma cobrança específica:

var charge = new JunoCharge(tokenResponse.AccessToken, _privateToken);
var chargeResponse = await charge.GetCharge("{ID_DA_COBRANCA}");

Gerar boleto de cobrança:

var charge = new JunoCharge(tokenResponse.AccessToken, _privateToken);
var body = new ChargeRequest
{
    Charge = new Charge
    {
        Description = "Descrição da Cobrança",
        References = new List<string> { "Referencia para identificação da cobrança" },
        Amount = 22.45, // valor da cobrança
        Fine = 3, // multa
        Interest = "2.4", // juros
        DueDate = DateTime.Now.AddDays(10).ToString("yyyy-MM-dd"), // data de vencimento
        MaxOverdueDays = 3, // dias máximo para boleto vencido
        PaymentAdvance = true // permitir adiantamento do pagamento
    },
    Billing = new Billing
    {
        Name = "Joao da Silva", // Nome do destinatário para cobrança
        Document = "17849259939", // CPF
        Email = "email@dominio.com",
        Phone = "+5581732141290",
        BirthDate = "1968-03-21",
        Notify = true // Envia um e-mail para o usuário com a informação do boleto gerado
    }
};
var chargeResponse = await charge.GenerateBillingBillAsync(body);

Cancelar boleto gerado

var charge = new JunoCharge(tokenResponse.AccessToken, _privateToken);
var chargeResponse = await charge.CancelBillingBillAsync("{ID_DA_COBRANCA}");
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.3 680 1/29/2021
0.0.2 338 1/12/2021
0.0.1 363 1/12/2021

- Geração de Token de Autenticação
- Consulta de Saldo
- Consulta de boletos gerados
- Geração de novos boletos
- Cancelamento de boletos