Skip to content

Commit

Permalink
CSharpier format
Browse files Browse the repository at this point in the history
  • Loading branch information
gstraccini[bot] committed Aug 28, 2024
1 parent 0506ef4 commit 5c4c1d5
Show file tree
Hide file tree
Showing 16 changed files with 93 additions and 29 deletions.
13 changes: 13 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"csharpier": {
"version": "0.29.1",
"commands": [
"dotnet-csharpier"
],
"rollForward": false
}
}
}
2 changes: 1 addition & 1 deletion Src/PIXBacen/ChargeFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ public class ChargeFilter

public int ItensPorPagina { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion Src/PIXBacen/CobrancaPayloadList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ public class CobrancaPayloadList

public CobrancaPayload[] Cobs { get; set; }
}
}
}
39 changes: 32 additions & 7 deletions Src/PIXBacen/IPixClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,43 @@

public interface IPixClient
{
ValueTask<string> GetChargePayloadAsync(string accessToken, CancellationToken cancellationToken);
ValueTask<string> GetChargePayloadAsync(
string accessToken,
CancellationToken cancellationToken
);

ValueTask<string> GetChargePayloadWithDueDateAsync(string accessToken, string ibgeCode, DateTime desiredPaymentDate, CancellationToken cancellationToken);
ValueTask<string> GetChargePayloadWithDueDateAsync(
string accessToken,
string ibgeCode,
DateTime desiredPaymentDate,
CancellationToken cancellationToken
);

ValueTask<CobrancaPayload> PutChargeAsync(string txId, CobrancaPayload charge, CancellationToken cancellationToken);
ValueTask<CobrancaPayload> PutChargeAsync(
string txId,
CobrancaPayload charge,
CancellationToken cancellationToken
);

ValueTask<CobrancaPayload> PatchChargeAsync(string txId, CobrancaPayload charge, CancellationToken cancellationToken);
ValueTask<CobrancaPayload> PatchChargeAsync(
string txId,
CobrancaPayload charge,
CancellationToken cancellationToken
);

ValueTask<CobrancaPayload> GetChargeAsync(string txtId, CancellationToken cancellationToken);
ValueTask<CobrancaPayload> GetChargeAsync(
string txtId,
CancellationToken cancellationToken
);

ValueTask<CobrancaPayload> PostChargeAsync(CobrancaPayload charge, CancellationToken cancellationToken);
ValueTask<CobrancaPayload> PostChargeAsync(
CobrancaPayload charge,
CancellationToken cancellationToken
);

ValueTask<CobrancaPayloadList> GetChargesAsync(ChargeFilter filters, CancellationToken cancellationToken);
ValueTask<CobrancaPayloadList> GetChargesAsync(
ChargeFilter filters,
CancellationToken cancellationToken
);
}
}
2 changes: 1 addition & 1 deletion Src/PIXBacen/Models_/Calendario.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public class Calendario

public long ValidadeAposVencimento { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion Src/PIXBacen/Models_/Devolucao.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ public class Devolucao

public string Status { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion Src/PIXBacen/Models_/Horario.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ public class Horario
{
public DateTime Solicitacao { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion Src/PIXBacen/Models_/InfoAdicional.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ public class InfoAdicional
public string Nome { get; set; }
public string Valor { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion Src/PIXBacen/Models_/Loc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ public class Loc
public string Location { get; set; }
public string TipoCob { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion Src/PIXBacen/Models_/Pessoa.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public class Pessoa

public string Nome { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion Src/PIXBacen/Models_/Pix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public class Pix

public Devolucao[] Devolucoes { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion Src/PIXBacen/Models_/Valor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ public class Valor

public decimal Final { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion Src/PIXBacen/Paginacao.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ public class Paginacao
public int QuantidadeDePaginas { get; set; }
public int QuantidadeTotalDeItens { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion Src/PIXBacen/Parametros.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ public class Parametros
public DateTime Fim { get; set; }
public Paginacao Paginacao { get; set; }
}
}
}
40 changes: 32 additions & 8 deletions Src/PIXBacen/PixClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,62 @@ public class PixClient : IPixClient
{
#region Implementation of IPixClient

public ValueTask<string> GetChargePayloadAsync(string accessToken, CancellationToken cancellationToken)
public ValueTask<string> GetChargePayloadAsync(
string accessToken,
CancellationToken cancellationToken
)
{
throw new NotImplementedException();
}

public ValueTask<string> GetChargePayloadWithDueDateAsync(string accessToken, string ibgeCode, DateTime desiredPaymentDate,
CancellationToken cancellationToken)
public ValueTask<string> GetChargePayloadWithDueDateAsync(
string accessToken,
string ibgeCode,
DateTime desiredPaymentDate,
CancellationToken cancellationToken
)
{
throw new NotImplementedException();
}

public ValueTask<CobrancaPayload> PutChargeAsync(string txId, CobrancaPayload charge, CancellationToken cancellationToken)
public ValueTask<CobrancaPayload> PutChargeAsync(
string txId,
CobrancaPayload charge,
CancellationToken cancellationToken
)
{
throw new NotImplementedException();
}

public ValueTask<CobrancaPayload> PatchChargeAsync(string txId, CobrancaPayload charge, CancellationToken cancellationToken)
public ValueTask<CobrancaPayload> PatchChargeAsync(
string txId,
CobrancaPayload charge,
CancellationToken cancellationToken
)
{
throw new NotImplementedException();
}

public ValueTask<CobrancaPayload> GetChargeAsync(string txtId, CancellationToken cancellationToken)
public ValueTask<CobrancaPayload> GetChargeAsync(
string txtId,
CancellationToken cancellationToken
)
{
throw new NotImplementedException();
}

public ValueTask<CobrancaPayload> PostChargeAsync(CobrancaPayload charge, CancellationToken cancellationToken)
public ValueTask<CobrancaPayload> PostChargeAsync(
CobrancaPayload charge,
CancellationToken cancellationToken
)
{
throw new NotImplementedException();
}

public ValueTask<CobrancaPayloadList> GetChargesAsync(ChargeFilter filters, CancellationToken cancellationToken)
public ValueTask<CobrancaPayloadList> GetChargesAsync(
ChargeFilter filters,
CancellationToken cancellationToken
)
{
throw new NotImplementedException();
}
Expand Down
6 changes: 4 additions & 2 deletions Tests/PixBacen.Tests/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace PIXBacen.Tests
{
using Xunit;
using System;
using System.Threading;
using System.Threading.Tasks;
using PIXBacen;
using Xunit;

public class UnitTest1
{
Expand All @@ -13,7 +13,9 @@ public async Task Test1()
{
var client = new PixClient();

await Assert.ThrowsAsync<NotImplementedException>(async () => await client.GetChargePayloadAsync(string.Empty, CancellationToken.None));
await Assert.ThrowsAsync<NotImplementedException>(
async () => await client.GetChargePayloadAsync(string.Empty, CancellationToken.None)
);
}
}
}

0 comments on commit 5c4c1d5

Please sign in to comment.