Skip to content

Commit

Permalink
2.4.5 (#106)
Browse files Browse the repository at this point in the history
Co-authored-by: Unknown <[email protected]>
  • Loading branch information
magnomoreira and samuelleitemundipagg authored Jun 19, 2023
1 parent fe465d5 commit 3ac143f
Show file tree
Hide file tree
Showing 19 changed files with 308 additions and 179 deletions.
3 changes: 3 additions & 0 deletions MundiAPI.PCL/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ public partial class Configuration
//The base Uri for API calls
public static string BaseUri = "https://api.mundipagg.com/core/v1";

//TODO: Replace the ServiceRefererName with an appropriate value
public static string ServiceRefererName = "";

//The username to use with basic authentication
//TODO: Replace the BasicAuthUserName with an appropriate value
public static string BasicAuthUserName = "";
Expand Down
39 changes: 26 additions & 13 deletions MundiAPI.PCL/Controllers/ChargesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ public Models.ChargesResponse GetCharge(string chargeId)
//append request with appropriate headers and parameters
var _headers = new Dictionary<string,string>()
{
{ "user-agent", "MundiSDK - DotNet 2.4.4" },
{ "user-agent", "MundiSDK - DotNet 2.4.5" },
{ "accept", "application/json" }
};
_headers.Add("ServiceRefererName", Configuration.ServiceRefererName);

//prepare the API call request to fetch the response
HttpRequest _request = ClientInstance.Get(_queryUrl,_headers, Configuration.BasicAuthUserName, Configuration.BasicAuthPassword);
Expand Down Expand Up @@ -174,11 +175,12 @@ public Models.ChargesResponse CancelCharge(string chargeId, string idempotencyKe
//append request with appropriate headers and parameters
var _headers = new Dictionary<string,string>()
{
{ "user-agent", "MundiSDK - DotNet 2.4.4" },
{ "user-agent", "MundiSDK - DotNet 2.4.5" },
{ "accept", "application/json" },
{ "Content-Type", "application/json" },
{ "idempotency-key", idempotencyKey }
};
_headers.Add("ServiceRefererName", Configuration.ServiceRefererName);

//append body params
var _body = APIHelper.JsonSerialize(body);
Expand Down Expand Up @@ -265,11 +267,12 @@ public Models.ChargesConfirmPaymentResponse ConfirmPayment(string chargeId, stri
//append request with appropriate headers and parameters
var _headers = new Dictionary<string,string>()
{
{ "user-agent", "MundiSDK - DotNet 2.4.4" },
{ "user-agent", "MundiSDK - DotNet 2.4.5" },
{ "accept", "application/json" },
{ "Content-Type", "application/json" },
{ "idempotency-key", idempotencyKey }
};
_headers.Add("ServiceRefererName", Configuration.ServiceRefererName);

//append body params
var _body = APIHelper.JsonSerialize(body);
Expand Down Expand Up @@ -356,11 +359,12 @@ public Models.ChargesCardResponse UpdateChargeCard(string chargeId, Models.Charg
//append request with appropriate headers and parameters
var _headers = new Dictionary<string,string>()
{
{ "user-agent", "MundiSDK - DotNet 2.4.4" },
{ "user-agent", "MundiSDK - DotNet 2.4.5" },
{ "accept", "application/json" },
{ "Content-Type", "application/json" },
{ "idempotency-key", idempotencyKey }
};
_headers.Add("ServiceRefererName", Configuration.ServiceRefererName);

//append body params
var _body = APIHelper.JsonSerialize(body);
Expand Down Expand Up @@ -485,9 +489,10 @@ public Models.ChargesResponse2 GetCharges(
//append request with appropriate headers and parameters
var _headers = new Dictionary<string,string>()
{
{ "user-agent", "MundiSDK - DotNet 2.4.4" },
{ "user-agent", "MundiSDK - DotNet 2.4.5" },
{ "accept", "application/json" }
};
_headers.Add("ServiceRefererName", Configuration.ServiceRefererName);

//prepare the API call request to fetch the response
HttpRequest _request = ClientInstance.Get(_queryUrl,_headers, Configuration.BasicAuthUserName, Configuration.BasicAuthPassword);
Expand Down Expand Up @@ -569,10 +574,11 @@ public Models.ChargesRetryResponse RetryCharge(string chargeId, string idempoten
//append request with appropriate headers and parameters
var _headers = new Dictionary<string,string>()
{
{ "user-agent", "MundiSDK - DotNet 2.4.4" },
{ "user-agent", "MundiSDK - DotNet 2.4.5" },
{ "accept", "application/json" },
{ "idempotency-key", idempotencyKey }
};
_headers.Add("ServiceRefererName", Configuration.ServiceRefererName);

//prepare the API call request to fetch the response
HttpRequest _request = ClientInstance.Post(_queryUrl, _headers, null, Configuration.BasicAuthUserName, Configuration.BasicAuthPassword);
Expand Down Expand Up @@ -656,11 +662,12 @@ public Models.ChargesPaymentMethodResponse UpdateChargePaymentMethod(string char
//append request with appropriate headers and parameters
var _headers = new Dictionary<string,string>()
{
{ "user-agent", "MundiSDK - DotNet 2.4.4" },
{ "user-agent", "MundiSDK - DotNet 2.4.5" },
{ "accept", "application/json" },
{ "Content-Type", "application/json" },
{ "idempotency-key", idempotencyKey }
};
_headers.Add("ServiceRefererName", Configuration.ServiceRefererName);

//append body params
var _body = APIHelper.JsonSerialize(body);
Expand Down Expand Up @@ -747,11 +754,12 @@ public Models.ChargesMetadataResponse UpdateChargeMetadata(string chargeId, Mode
//append request with appropriate headers and parameters
var _headers = new Dictionary<string,string>()
{
{ "user-agent", "MundiSDK - DotNet 2.4.4" },
{ "user-agent", "MundiSDK - DotNet 2.4.5" },
{ "accept", "application/json" },
{ "Content-Type", "application/json" },
{ "idempotency-key", idempotencyKey }
};
_headers.Add("ServiceRefererName", Configuration.ServiceRefererName);

//append body params
var _body = APIHelper.JsonSerialize(body);
Expand Down Expand Up @@ -838,11 +846,12 @@ public Models.ChargesCaptureResponse CaptureCharge(string chargeId, string idemp
//append request with appropriate headers and parameters
var _headers = new Dictionary<string,string>()
{
{ "user-agent", "MundiSDK - DotNet 2.4.4" },
{ "user-agent", "MundiSDK - DotNet 2.4.5" },
{ "accept", "application/json" },
{ "Content-Type", "application/json" },
{ "idempotency-key", idempotencyKey }
};
_headers.Add("ServiceRefererName", Configuration.ServiceRefererName);

//append body params
var _body = APIHelper.JsonSerialize(body);
Expand Down Expand Up @@ -929,11 +938,12 @@ public Models.ChargesDueDateResponse UpdateChargeDueDate(string chargeId, Models
//append request with appropriate headers and parameters
var _headers = new Dictionary<string,string>()
{
{ "user-agent", "MundiSDK - DotNet 2.4.4" },
{ "user-agent", "MundiSDK - DotNet 2.4.5" },
{ "accept", "application/json" },
{ "Content-Type", "application/json" },
{ "idempotency-key", idempotencyKey }
};
_headers.Add("ServiceRefererName", Configuration.ServiceRefererName);

//append body params
var _body = APIHelper.JsonSerialize(body);
Expand Down Expand Up @@ -1012,11 +1022,12 @@ public Models.ChargesResponse CreateCharge(Models.ChargesRequest1 body, string i
//append request with appropriate headers and parameters
var _headers = new Dictionary<string,string>()
{
{ "user-agent", "MundiSDK - DotNet 2.4.4" },
{ "user-agent", "MundiSDK - DotNet 2.4.5" },
{ "accept", "application/json" },
{ "Content-Type", "application/json" },
{ "idempotency-key", idempotencyKey }
};
_headers.Add("ServiceRefererName", Configuration.ServiceRefererName);

//append body params
var _body = APIHelper.JsonSerialize(body);
Expand Down Expand Up @@ -1110,9 +1121,10 @@ public Models.ChargesTransactionsResponse GetChargeTransactions(string chargeId,
//append request with appropriate headers and parameters
var _headers = new Dictionary<string,string>()
{
{ "user-agent", "MundiSDK - DotNet 2.4.4" },
{ "user-agent", "MundiSDK - DotNet 2.4.5" },
{ "accept", "application/json" }
};
_headers.Add("ServiceRefererName", Configuration.ServiceRefererName);

//prepare the API call request to fetch the response
HttpRequest _request = ClientInstance.Get(_queryUrl,_headers, Configuration.BasicAuthUserName, Configuration.BasicAuthPassword);
Expand Down Expand Up @@ -1198,9 +1210,10 @@ public Models.GetChargesSummaryResponse GetChargesSummary(string status, DateTim
//append request with appropriate headers and parameters
var _headers = new Dictionary<string,string>()
{
{ "user-agent", "MundiSDK - DotNet 2.4.4" },
{ "user-agent", "MundiSDK - DotNet 2.4.5" },
{ "accept", "application/json" }
};
_headers.Add("ServiceRefererName", Configuration.ServiceRefererName);

//prepare the API call request to fetch the response
HttpRequest _request = ClientInstance.Get(_queryUrl,_headers, Configuration.BasicAuthUserName, Configuration.BasicAuthPassword);
Expand Down
Loading

0 comments on commit 3ac143f

Please sign in to comment.