-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from pallomabritoGN/master
Versão 3.0.0
- Loading branch information
Showing
33 changed files
with
1,396 additions
and
446 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 10 additions & 5 deletions
15
Gerencianet.NETCore.SDK.Examples/Gerencianet.NETCore.SDK.Examples.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
<TargetFramework>net5.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CSharp" Version="4.6.0"/> | ||
<PackageReference Include="RestSharp" Version="106.12.0"/> | ||
<PackageReference Include="System.Drawing.Common" Version="6.0.0-preview.3.21201.4"/> | ||
<PackageReference Include="Gerencianet.NETCore.SDK" Version="2.0.2"/> | ||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | ||
<PackageReference Include="RestSharp" Version="108.0.1" /> | ||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" /> | ||
<PackageReference Include="Gerencianet.NETCore.SDK" Version="3.0.0"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Reference Include="System"> | ||
<HintPath>System</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,121 @@ | ||
namespace Gerencianet.NETCore.SDK.Examples { | ||
internal class Program { | ||
private static void Main (string[] args) { | ||
using System; | ||
|
||
/* PIX - WEBHOOK*/ | ||
//PixConfigWebhook.Execute(); | ||
//PixDeleteWebhook.Execute(); | ||
//PixDetailWebhook.Execute(); | ||
//PixListWebhook.Execute(); | ||
namespace Gerencianet.NETCore.SDK.Examples | ||
{ | ||
internal class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
/* PIX - WEBHOOK */ | ||
// PixConfigWebhook.Execute(); | ||
// PixDeleteWebhook.Execute(); | ||
// PixDetailWebhook.Execute(); | ||
// PixListWebhook.Execute(); | ||
|
||
/* PIX - CHARGE*/ | ||
//PixCreateCharge.Execute(); | ||
//PixCreateImmediateCharge.Execute(); | ||
//PixDetailCharge.Execute(); | ||
//PixListCharges.Execute(); | ||
//PixUpdateCharge.Execute(); | ||
/* PIX - CHARGE */ | ||
// PixCreateCharge.Execute(); | ||
// PixCreateImmediateCharge.Execute(); | ||
// PixDetailCharge.Execute(); | ||
// PixListCharges.Execute(); | ||
// PixUpdateCharge.Execute(); | ||
|
||
/* PIX - COBV */ | ||
// PixCreateDueCharge.Execute(); | ||
// PixUpdateDueCharge.Execute(); | ||
// PixDetailDueCharge.Execute(); | ||
// PixListDueCharges.Execute(); | ||
|
||
/* PIX - PIX*/ | ||
//PixDetail.Execute(); | ||
//PixDevolution.Execute(); | ||
//PixDetailDevolution.Execute(); | ||
//PixListReceived.Execute(); | ||
//PixSend.Execute(); | ||
/* PIX - PIX */ | ||
// PixDetail.Execute(); | ||
// PixDevolution.Execute(); | ||
// PixDetailDevolution.Execute(); | ||
// PixListReceived.Execute(); | ||
// PixSend.Execute(); | ||
|
||
/* PIX - LOCATION*/ | ||
//PixCreateLocation.Execute(); | ||
//PixDetailLocation.Execute(); | ||
//PixListLocation.Execute(); | ||
//PixUnsetTxid.Execute(); | ||
//PixGenerateQRCode.Execute(); | ||
/* PIX - LOCATION */ | ||
// PixCreateLocation.Execute(); | ||
// PixDetailLocation.Execute(); | ||
// PixListLocation.Execute(); | ||
// PixUnsetTxid.Execute(); | ||
// PixGenerateQRCode.Execute(); | ||
|
||
/* GN - KEY */ | ||
// GnListEvp.Execute(); | ||
// GnCreateEvp.Execute(); | ||
// GnDeleteEvp.Execute(); | ||
|
||
/* GN - KEY*/ | ||
//GnListEvp.Execute(); | ||
//GnCreateEvp.Execute(); | ||
//GnDeleteEvp.Execute(); | ||
/* GN - ACCOUNT */ | ||
// GnDetailBalance.Execute(); | ||
// GnDetailSettings.Execute(); | ||
// GnUpdateSettings.Execute(); | ||
|
||
/* GN - ACCOUNT*/ | ||
//GnDetailBalance.Execute(); | ||
//GnDetailSettings.Execute(); | ||
//GnUpdateSettings.Execute(); | ||
/* GN - REPORT */ | ||
// CreateReport.Execute(); | ||
// DetailReport.Execute(); | ||
|
||
/* CHARGES */ | ||
//OneStepBankingBillet.Execute (); | ||
//CreateCharge.Execute(); | ||
//CreateChargeHistory.Execute(); | ||
//DetailCharge.Execute(); | ||
//ResendBillet.Execute(); | ||
//UpdateBillet.Execute(); | ||
//UpdateChargeMetadata.Execute(); | ||
//CancelCharge.Execute(); | ||
//SettleCharge.Execute(); | ||
//CreateBilletPayment.Execute(); | ||
//CreateCardPayment.Execute(); | ||
//ChargeLink.Execute(); | ||
// OneStepBankingBillet.Execute (); | ||
// CreateCharge.Execute(); | ||
// CreateChargeHistory.Execute(); | ||
// DetailCharge.Execute(); | ||
// ResendBillet.Execute(); | ||
// UpdateBillet.Execute(); | ||
// UpdateChargeMetadata.Execute(); | ||
// CancelCharge.Execute(); | ||
// SettleCharge.Execute(); | ||
// CreateBilletPayment.Execute(); | ||
// CreateCardPayment.Execute(); | ||
// ChargeLink.Execute(); | ||
// OneStepLink.Execute(); | ||
// ResendChargeLink.Execute(); | ||
|
||
/* SUBSCRIPTIONS */ | ||
//CancelSubscription.Execute(); | ||
//CreatePlan.Execute(); | ||
//GetPlans.Execute(); | ||
//DeletePlan.Execute(); | ||
//CreateSubscription.Execute(); | ||
//CreateSubscriptionHistory.Execute(); | ||
//CreateSubscriptionPayment.Execute(); | ||
//DetailSubscription.Execute(); | ||
//UpdateSubscriptionMetadata.Execute(); | ||
//UpdatePlan.Execute(); | ||
// CancelSubscription.Execute(); | ||
// CreatePlan.Execute(); | ||
// GetPlans.Execute(); | ||
// DeletePlan.Execute(); | ||
// CreateSubscription.Execute(); | ||
// CreateSubscriptionHistory.Execute(); | ||
// CreateSubscriptionPayment.Execute(); | ||
// DetailSubscription.Execute(); | ||
// UpdateSubscriptionMetadata.Execute(); | ||
// UpdatePlan.Execute(); | ||
// OneStepSubscriptionLink.Execute(); | ||
// OneStepSubscription.Execute(); | ||
// ResendSubscriptionCharge.Execute(); | ||
|
||
/* CARNETS */ | ||
//CancelCarnet.Execute(); | ||
//CancelParcel.Execute(); | ||
//CreateCarnet.Execute(); | ||
//CreateCarnetHistory.Execute(); | ||
//DetailCarnet.Execute(); | ||
//ResendCarnet.Execute(); | ||
//ResendParcel.Execute(); | ||
//SettleCarnetParcel.Execute(); | ||
//UpdateCarnetMetadata.Execute(); | ||
//UpdateParcel.Execute(); | ||
// CancelCarnet.Execute(); | ||
// CancelParcel.Execute(); | ||
// CreateCarnet.Execute(); | ||
// CreateCarnetHistory.Execute(); | ||
// DetailCarnet.Execute(); | ||
// ResendCarnet.Execute(); | ||
// ResendParcel.Execute(); | ||
// SettleCarnet.Execute(); | ||
// SettleCarnetParcel.Execute(); | ||
// UpdateCarnetMetadata.Execute(); | ||
// UpdateParcel.Execute(); | ||
|
||
/* NOTIFICATIONS */ | ||
//GetNotification.Execute(); | ||
|
||
/* OTHER */ | ||
//GetInstallments.Execute(); | ||
// GetInstallments.Execute(); | ||
|
||
/* OPEN FINANCE */ | ||
// OfUpdateSettings.Execute(); | ||
// OfDetailSettings.Execute(); | ||
// OfListParticipants.Execute(); | ||
// OfStartPixPayment.Execute(); | ||
// OfListPixPayment.Execute(); | ||
|
||
/* PAYMENTS */ | ||
// PayDetailBarCode.Execute(); | ||
// PayRequestBarCode.Execute(); | ||
// PayDetailPayment.Execute(); | ||
// PayListPayments.Execute(); | ||
|
||
//AllInOne.Execute(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"client_id": "", | ||
"client_secret": "", | ||
"sandbox": false, | ||
"pix_cert": "certificate.p12" | ||
"client_id":"", | ||
"client_secret":"", | ||
"sandbox": false, | ||
"certificate": "production.p12" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
Gerencianet.NETCore.SDK.Examples/default/carnet/SettleCarnet.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.IO; | ||
using Newtonsoft.Json.Linq; | ||
|
||
namespace Gerencianet.NETCore.SDK.Examples { | ||
internal class SettleCarnet { | ||
public static void Execute () { | ||
|
||
dynamic endpoints = new Endpoints(JObject.Parse (File.ReadAllText ("credentials.json"))); | ||
|
||
var param = new { | ||
id = 1, | ||
parcel = 1 | ||
}; | ||
|
||
try { | ||
var response = endpoints.SettleCarnet(param); | ||
Console.WriteLine (response); | ||
} catch (GnException e) { | ||
Console.WriteLine (e.ErrorType); | ||
Console.WriteLine (e.Message); | ||
} | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
Gerencianet.NETCore.SDK.Examples/default/charge/OneStepLink.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using System.IO; | ||
using Newtonsoft.Json.Linq; | ||
|
||
|
||
namespace Gerencianet.NETCore.SDK.Examples { | ||
internal class OneStepLink { | ||
public static void Execute () { | ||
|
||
dynamic endpoints = new Endpoints(JObject.Parse (File.ReadAllText ("credentials.json"))); | ||
|
||
var body = new { | ||
items = new [] { | ||
new { | ||
name = "Product 1", | ||
value = 590, | ||
amount = 2 | ||
} | ||
}, | ||
settings = new { | ||
payment_method = "all", | ||
expire_at = "2022-12-15", | ||
request_delivery_address = false | ||
} | ||
}; | ||
|
||
try { | ||
var response = endpoints.OneStepLink(null, body); | ||
Console.WriteLine (response); | ||
} catch (GnException e) { | ||
Console.WriteLine (e.ErrorType); | ||
Console.WriteLine (e.Message); | ||
} | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
Gerencianet.NETCore.SDK.Examples/default/charge/ResendChargeLink.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.IO; | ||
using Newtonsoft.Json.Linq; | ||
|
||
|
||
namespace Gerencianet.NETCore.SDK.Examples { | ||
internal class ResendChargeLink { | ||
public static void Execute () { | ||
|
||
dynamic endpoints = new Endpoints(JObject.Parse (File.ReadAllText ("credentials.json"))); | ||
|
||
var param = new { | ||
id = 1 | ||
}; | ||
|
||
try { | ||
var response = endpoints.ResendChargeLink(param); | ||
Console.WriteLine (response); | ||
} catch (GnException e) { | ||
Console.WriteLine (e.ErrorType); | ||
Console.WriteLine (e.Message); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.