Skip to content

Commit

Permalink
feat: Create charges (#115)
Browse files Browse the repository at this point in the history
- Added a new summary field for the "Create charges" operation in the API documentation
- Removed the "agreement" and "product_type" properties from the ChargeResponse and ChargesDataResponse models
- Updated the package version to 6.0.13
  • Loading branch information
fcarrero authored Oct 25, 2024
1 parent da26907 commit 999db29
Show file tree
Hide file tree
Showing 19 changed files with 69 additions and 117 deletions.
10 changes: 5 additions & 5 deletions Conekta.net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Conekta.net", "src\Conekta.net\Conekta.net.csproj", "{604EDD2F-2B46-4DDC-8212-DC4E6595C4E6}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Conekta.net", "src\Conekta.net\Conekta.net.csproj", "{BC7C545E-C9C4-4F7B-8BA2-1F5C0C7C8B5F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Conekta.net.Test", "src\Conekta.net.Test\Conekta.net.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Expand All @@ -12,10 +12,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{604EDD2F-2B46-4DDC-8212-DC4E6595C4E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{604EDD2F-2B46-4DDC-8212-DC4E6595C4E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{604EDD2F-2B46-4DDC-8212-DC4E6595C4E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{604EDD2F-2B46-4DDC-8212-DC4E6595C4E6}.Release|Any CPU.Build.0 = Release|Any CPU
{BC7C545E-C9C4-4F7B-8BA2-1F5C0C7C8B5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC7C545E-C9C4-4F7B-8BA2-1F5C0C7C8B5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC7C545E-C9C4-4F7B-8BA2-1F5C0C7C8B5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC7C545E-C9C4-4F7B-8BA2-1F5C0C7C8B5F}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.12
6.0.13
19 changes: 10 additions & 9 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1704,6 +1704,7 @@ paths:
description: internal server error
security:
- bearerAuth: []
summary: Create charges
tags:
- Charges
/companies:
Expand Down Expand Up @@ -13412,10 +13413,6 @@ components:
type: object
charge_response:
properties:
agreement:
description: Agreement ID
example: agreement_2tN73UdUSNrYRPD9r
type: string
amount:
example: 4321
type: integer
Expand Down Expand Up @@ -13466,11 +13463,6 @@ components:
type: integer
payment_method:
$ref: '#/components/schemas/charge_response_payment_method'
product_type:
description: "Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in,\
\ etc."
example: bbva_cash_in
type: string
reference_id:
description: Reference ID of the charge
example: ref_2tN73UdUSNrYRPD9r
Expand Down Expand Up @@ -15781,6 +15773,10 @@ components:
- $ref: '#/components/schemas/payment_method'
- description: use for cash responses
properties:
agreement:
description: Agreement ID
example: agreement_2tN73UdUSNrYRPD9r
type: string
auth_code:
example: 542563
nullable: true
Expand All @@ -15799,6 +15795,11 @@ components:
example: 0
format: int64
type: integer
product_type:
description: "Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in,\
\ etc."
example: bbva_cash_in
type: string
service_name:
example: OxxoPay
type: string
Expand Down
2 changes: 1 addition & 1 deletion config-netcore.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
"packageCopyright" : "Conekta",
"PackageReleaseNotes" : "add support for payout orders",
"releaseNote" : "update entity webhook, nuget config",
"packageVersion" : "6.0.12"
"packageVersion" : "6.0.13"
}
2 changes: 2 additions & 0 deletions docs/ChargeOrderResponsePaymentMethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Type** | **string** | | [optional]
**Object** | **string** | |
**Agreement** | **string** | Agreement ID | [optional]
**AuthCode** | **string** | | [optional]
**CashierId** | **string** | | [optional]
**Reference** | **string** | | [optional]
**BarcodeUrl** | **string** | | [optional]
**ExpiresAt** | **long** | | [optional]
**ProductType** | **string** | Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in, etc. | [optional]
**ServiceName** | **string** | | [optional]
**Store** | **string** | | [optional]
**StoreName** | **string** | | [optional]
Expand Down
2 changes: 0 additions & 2 deletions docs/ChargeResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Agreement** | **string** | Agreement ID | [optional]
**Amount** | **int** | | [optional]
**Channel** | [**ChargeResponseChannel**](ChargeResponseChannel.md) | | [optional]
**CreatedAt** | **long** | | [optional]
Expand All @@ -20,7 +19,6 @@ Name | Type | Description | Notes
**OrderId** | **string** | Order ID | [optional]
**PaidAt** | **long?** | Payment date | [optional]
**PaymentMethod** | [**ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional]
**ProductType** | **string** | Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in, etc. | [optional]
**ReferenceId** | **string** | Reference ID of the charge | [optional]
**Refunds** | [**ChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional]
**Status** | **string** | | [optional]
Expand Down
2 changes: 2 additions & 0 deletions docs/ChargeResponsePaymentMethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Type** | **string** | | [optional]
**Object** | **string** | |
**Agreement** | **string** | Agreement ID | [optional]
**AuthCode** | **string** | | [optional]
**CashierId** | **string** | | [optional]
**Reference** | **string** | | [optional]
**BarcodeUrl** | **string** | | [optional]
**ExpiresAt** | **long** | | [optional]
**ProductType** | **string** | Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in, etc. | [optional]
**ServiceName** | **string** | | [optional]
**Store** | **string** | | [optional]
**StoreName** | **string** | | [optional]
Expand Down
6 changes: 4 additions & 2 deletions docs/ChargesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ All URIs are relative to *https://api.conekta.io*
|--------|--------------|-------------|
| [**GetCharges**](ChargesApi.md#getcharges) | **GET** /charges | Get A List of Charges |
| [**OrdersCreateCharge**](ChargesApi.md#orderscreatecharge) | **POST** /orders/{id}/charges | Create charge |
| [**OrdersCreateCharges**](ChargesApi.md#orderscreatecharges) | **POST** /orders/{id}/add_charges | |
| [**OrdersCreateCharges**](ChargesApi.md#orderscreatecharges) | **POST** /orders/{id}/add_charges | Create charges |
| [**UpdateCharge**](ChargesApi.md#updatecharge) | **PUT** /charges/{id} | Update a charge |

<a id="getcharges"></a>
Expand Down Expand Up @@ -221,7 +221,7 @@ catch (ApiException e)
# **OrdersCreateCharges**
> ChargesOrderResponse OrdersCreateCharges (string id, ChargeRequest chargeRequest, string acceptLanguage = null, string xChildCompanyId = null)

Create charges

Create charges for an existing orden

Expand Down Expand Up @@ -252,6 +252,7 @@ namespace Example
try
{
// Create charges
ChargesOrderResponse result = apiInstance.OrdersCreateCharges(id, chargeRequest, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
Expand All @@ -272,6 +273,7 @@ This returns an ApiResponse object which contains the response data, status code
```csharp
try
{
// Create charges
ApiResponse<ChargesOrderResponse> response = apiInstance.OrdersCreateChargesWithHttpInfo(id, chargeRequest, acceptLanguage, xChildCompanyId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Expand Down
2 changes: 0 additions & 2 deletions docs/ChargesDataResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Agreement** | **string** | Agreement ID | [optional]
**Amount** | **int** | | [optional]
**Channel** | [**ChargeResponseChannel**](ChargeResponseChannel.md) | | [optional]
**CreatedAt** | **long** | | [optional]
Expand All @@ -20,7 +19,6 @@ Name | Type | Description | Notes
**OrderId** | **string** | Order ID | [optional]
**PaidAt** | **long?** | Payment date | [optional]
**PaymentMethod** | [**ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional]
**ProductType** | **string** | Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in, etc. | [optional]
**ReferenceId** | **string** | Reference ID of the charge | [optional]
**Refunds** | [**ChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional]
**Status** | **string** | | [optional]
Expand Down
2 changes: 0 additions & 2 deletions docs/ChargesOrderResponseAllOfData.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Agreement** | **string** | Agreement ID | [optional]
**Amount** | **int** | | [optional]
**Channel** | [**ChargeResponseChannel**](ChargeResponseChannel.md) | | [optional]
**CreatedAt** | **long** | | [optional]
Expand All @@ -20,7 +19,6 @@ Name | Type | Description | Notes
**OrderId** | **string** | Order ID | [optional]
**PaidAt** | **long?** | Payment date | [optional]
**PaymentMethod** | [**ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional]
**ProductType** | **string** | Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in, etc. | [optional]
**ReferenceId** | **string** | Reference ID of the charge | [optional]
**Refunds** | [**ChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional]
**Status** | **string** | | [optional]
Expand Down
2 changes: 2 additions & 0 deletions docs/PaymentMethodCash.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Type** | **string** | | [optional]
**Object** | **string** | |
**Agreement** | **string** | Agreement ID | [optional]
**AuthCode** | **int?** | | [optional]
**CashierId** | **string** | | [optional]
**Reference** | **string** | | [optional]
**BarcodeUrl** | **string** | | [optional]
**ExpiresAt** | **long** | | [optional]
**ProductType** | **string** | Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in, etc. | [optional]
**ServiceName** | **string** | | [optional]
**Store** | **string** | | [optional]
**StoreName** | **string** | | [optional]
Expand Down
1 change: 1 addition & 0 deletions src/Conekta.net.Test/Api/ChargesApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public void OrdersCreateChargesCashTest()

Assert.IsType<ChargesOrderResponse>(response);
Assert.Equal(2, response.Data.Count);
Assert.Equal("2409992", response.Data[0].PaymentMethod.GetPaymentMethodCash().Agreement);
}

/// <summary>
Expand Down
16 changes: 8 additions & 8 deletions src/Conekta.net/Api/ChargesApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public interface IChargesApiSync : IApiAccessor
/// <returns>ApiResponse of ChargeOrderResponse</returns>
ApiResponse<ChargeOrderResponse> OrdersCreateChargeWithHttpInfo(string id, ChargeRequest chargeRequest, string acceptLanguage = default(string), string xChildCompanyId = default(string), int operationIndex = 0);
/// <summary>
///
/// Create charges
/// </summary>
/// <remarks>
/// Create charges for an existing orden
Expand All @@ -102,7 +102,7 @@ public interface IChargesApiSync : IApiAccessor
ChargesOrderResponse OrdersCreateCharges(string id, ChargeRequest chargeRequest, string acceptLanguage = default(string), string xChildCompanyId = default(string), int operationIndex = 0);

/// <summary>
///
/// Create charges
/// </summary>
/// <remarks>
/// Create charges for an existing orden
Expand Down Expand Up @@ -217,7 +217,7 @@ public interface IChargesApiAsync : IApiAccessor
/// <returns>Task of ApiResponse (ChargeOrderResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<ChargeOrderResponse>> OrdersCreateChargeWithHttpInfoAsync(string id, ChargeRequest chargeRequest, string acceptLanguage = default(string), string xChildCompanyId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
/// <summary>
///
/// Create charges
/// </summary>
/// <remarks>
/// Create charges for an existing orden
Expand All @@ -233,7 +233,7 @@ public interface IChargesApiAsync : IApiAccessor
System.Threading.Tasks.Task<ChargesOrderResponse> OrdersCreateChargesAsync(string id, ChargeRequest chargeRequest, string acceptLanguage = default(string), string xChildCompanyId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));

/// <summary>
///
/// Create charges
/// </summary>
/// <remarks>
/// Create charges for an existing orden
Expand Down Expand Up @@ -809,7 +809,7 @@ public Conekta.net.Client.ExceptionFactory ExceptionFactory
}

/// <summary>
/// Create charges for an existing orden
/// Create charges Create charges for an existing orden
/// </summary>
/// <exception cref="Conekta.net.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="id">Identifier of the resource</param>
Expand All @@ -825,7 +825,7 @@ public Conekta.net.Client.ExceptionFactory ExceptionFactory
}

/// <summary>
/// Create charges for an existing orden
/// Create charges Create charges for an existing orden
/// </summary>
/// <exception cref="Conekta.net.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="id">Identifier of the resource</param>
Expand Down Expand Up @@ -907,7 +907,7 @@ public Conekta.net.Client.ExceptionFactory ExceptionFactory
}

/// <summary>
/// Create charges for an existing orden
/// Create charges Create charges for an existing orden
/// </summary>
/// <exception cref="Conekta.net.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="id">Identifier of the resource</param>
Expand All @@ -924,7 +924,7 @@ public Conekta.net.Client.ExceptionFactory ExceptionFactory
}

/// <summary>
/// Create charges for an existing orden
/// Create charges Create charges for an existing orden
/// </summary>
/// <exception cref="Conekta.net.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="id">Identifier of the resource</param>
Expand Down
4 changes: 2 additions & 2 deletions src/Conekta.net/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Configuration : IReadableConfiguration
/// Version of the package.
/// </summary>
/// <value>Version of the package.</value>
public const string Version = "6.0.12";
public const string Version = "6.0.13";

/// <summary>
/// Identifier for ISO 8601 DateTime Format
Expand Down Expand Up @@ -536,7 +536,7 @@ public static string ToDebugReport()
report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n";
report += " Version of the API: 2.1.0\n";
report += " SDK Package Version: 6.0.12\n";
report += " SDK Package Version: 6.0.13\n";

return report;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Conekta.net/Conekta.net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Description>This is a .net library that allows interaction with https://api.conekta.io API.</Description>
<Copyright>Conekta</Copyright>
<RootNamespace>Conekta.net</RootNamespace>
<Version>6.0.12</Version>
<Version>6.0.13</Version>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Conekta.net.xml</DocumentationFile>
<RepositoryUrl>https://github.com/conekta/conekta-.net.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand Down
Loading

0 comments on commit 999db29

Please sign in to comment.