JunoApiIntegration 0.0.1
See the version list below for details.
dotnet add package JunoApiIntegration --version 0.0.1
NuGet\Install-Package JunoApiIntegration -Version 0.0.1
<PackageReference Include="JunoApiIntegration" Version="0.0.1" />
paket add JunoApiIntegration --version 0.0.1
#r "nuget: JunoApiIntegration, 0.0.1"
// Install JunoApiIntegration as a Cake Addin #addin nuget:?package=JunoApiIntegration&version=0.0.1 // Install JunoApiIntegration as a Cake Tool #tool nuget:?package=JunoApiIntegration&version=0.0.1
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 | Versions 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. |
-
.NETCoreApp 3.1
- Newtonsoft.Json (>= 12.0.3)
- RestSharp (>= 106.11.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
- Geração de Token de Autenticação
- Consulta de Saldo
- Consulta de boletos gerados
- Geração de novos boletos
- Cancelamento de boletos