Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add new charge-related documentation and models #8

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ doc/ChargeResponseRefundsData.md
doc/ChargeUpdateRequest.md
doc/ChargesApi.md
doc/ChargesDataResponse.md
doc/ChargesOrderResponse.md
doc/ChargesOrderResponseAllOfData.md
doc/Checkout.md
doc/CheckoutOrderTemplate.md
doc/CheckoutOrderTemplateCustomerInfo.md
Expand Down Expand Up @@ -136,9 +138,11 @@ doc/PaymentMethodCardResponse.md
doc/PaymentMethodCash.md
doc/PaymentMethodCashRequest.md
doc/PaymentMethodCashResponse.md
doc/PaymentMethodGeneralRequest.md
doc/PaymentMethodResponse.md
doc/PaymentMethodSpeiRecurrent.md
doc/PaymentMethodSpeiRequest.md
doc/PaymentMethodTokenRequest.md
doc/PaymentMethodsApi.md
doc/Payout.md
doc/PayoutMethod.md
Expand Down Expand Up @@ -255,6 +259,8 @@ lib/src/model/charge_response_refunds.dart
lib/src/model/charge_response_refunds_data.dart
lib/src/model/charge_update_request.dart
lib/src/model/charges_data_response.dart
lib/src/model/charges_order_response.dart
lib/src/model/charges_order_response_all_of_data.dart
lib/src/model/checkout.dart
lib/src/model/checkout_order_template.dart
lib/src/model/checkout_order_template_customer_info.dart
Expand Down Expand Up @@ -356,9 +362,11 @@ lib/src/model/payment_method_card_response.dart
lib/src/model/payment_method_cash.dart
lib/src/model/payment_method_cash_request.dart
lib/src/model/payment_method_cash_response.dart
lib/src/model/payment_method_general_request.dart
lib/src/model/payment_method_response.dart
lib/src/model/payment_method_spei_recurrent.dart
lib/src/model/payment_method_spei_request.dart
lib/src/model/payment_method_token_request.dart
lib/src/model/payout.dart
lib/src/model/payout_method.dart
lib/src/model/payout_order.dart
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
7.10.0
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 6.0.5 -2024-30-04
* Fix entities
## 6.0.5 -2024-30-04
* Update entities and methods
## 6.0.4 -2024-20-02
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dart:
rm -rf ../conekta-dart/doc && \
rm -rf ../conekta-dart/lib/src/model && \
docker run --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli:v7.5.0 generate \
-v ${PWD}:/local openapitools/openapi-generator-cli:v7.10.0 generate \
-i https://raw.githubusercontent.com/conekta/openapi/main/_build/api.yaml \
-g dart-dio \
-o /local \
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For more information, please visit [https://github.com/conekta/openapi/issues](h
To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml
```yaml
dependencies:
conekta: 6.0.5
conekta: 6.0.6
```

### Github
Expand Down Expand Up @@ -82,6 +82,7 @@ Class | Method | HTTP request | Description
[*BalancesApi*](doc/BalancesApi.md) | [**getBalance**](doc/BalancesApi.md#getbalance) | **GET** /balance | Get a company's balance
[*ChargesApi*](doc/ChargesApi.md) | [**getCharges**](doc/ChargesApi.md#getcharges) | **GET** /charges | Get A List of Charges
[*ChargesApi*](doc/ChargesApi.md) | [**ordersCreateCharge**](doc/ChargesApi.md#orderscreatecharge) | **POST** /orders/{id}/charges | Create charge
[*ChargesApi*](doc/ChargesApi.md) | [**ordersCreateCharges**](doc/ChargesApi.md#orderscreatecharges) | **POST** /orders/{id}/add_charges | Create charges
[*ChargesApi*](doc/ChargesApi.md) | [**updateCharge**](doc/ChargesApi.md#updatecharge) | **PUT** /charges/{id} | Update a charge
[*CompaniesApi*](doc/CompaniesApi.md) | [**getCompanies**](doc/CompaniesApi.md#getcompanies) | **GET** /companies | Get List of Companies
[*CompaniesApi*](doc/CompaniesApi.md) | [**getCompany**](doc/CompaniesApi.md#getcompany) | **GET** /companies/{id} | Get Company
Expand Down Expand Up @@ -120,6 +121,7 @@ Class | Method | HTTP request | Description
[*PaymentMethodsApi*](doc/PaymentMethodsApi.md) | [**deleteCustomerPaymentMethods**](doc/PaymentMethodsApi.md#deletecustomerpaymentmethods) | **DELETE** /customers/{id}/payment_sources/{payment_method_id} | Delete Payment Method
[*PaymentMethodsApi*](doc/PaymentMethodsApi.md) | [**getCustomerPaymentMethods**](doc/PaymentMethodsApi.md#getcustomerpaymentmethods) | **GET** /customers/{id}/payment_sources | Get Payment Methods
[*PaymentMethodsApi*](doc/PaymentMethodsApi.md) | [**updateCustomerPaymentMethods**](doc/PaymentMethodsApi.md#updatecustomerpaymentmethods) | **PUT** /customers/{id}/payment_sources/{payment_method_id} | Update Payment Method
[*PayoutOrdersApi*](doc/PayoutOrdersApi.md) | [**cancelPayoutOrderById**](doc/PayoutOrdersApi.md#cancelpayoutorderbyid) | **PUT** /payout_orders/{id}/cancel | Cancel Payout Order
[*PayoutOrdersApi*](doc/PayoutOrdersApi.md) | [**createPayoutOrder**](doc/PayoutOrdersApi.md#createpayoutorder) | **POST** /payout_orders | Create payout order
[*PayoutOrdersApi*](doc/PayoutOrdersApi.md) | [**getPayoutOrderById**](doc/PayoutOrdersApi.md#getpayoutorderbyid) | **GET** /payout_orders/{id} | Get Payout Order
[*PayoutOrdersApi*](doc/PayoutOrdersApi.md) | [**getPayoutOrders**](doc/PayoutOrdersApi.md#getpayoutorders) | **GET** /payout_orders | Get a list of Payout Orders
Expand Down Expand Up @@ -186,6 +188,8 @@ Class | Method | HTTP request | Description
- [ChargeResponseRefundsData](doc/ChargeResponseRefundsData.md)
- [ChargeUpdateRequest](doc/ChargeUpdateRequest.md)
- [ChargesDataResponse](doc/ChargesDataResponse.md)
- [ChargesOrderResponse](doc/ChargesOrderResponse.md)
- [ChargesOrderResponseAllOfData](doc/ChargesOrderResponseAllOfData.md)
- [Checkout](doc/Checkout.md)
- [CheckoutOrderTemplate](doc/CheckoutOrderTemplate.md)
- [CheckoutOrderTemplateCustomerInfo](doc/CheckoutOrderTemplateCustomerInfo.md)
Expand Down Expand Up @@ -286,9 +290,11 @@ Class | Method | HTTP request | Description
- [PaymentMethodCash](doc/PaymentMethodCash.md)
- [PaymentMethodCashRequest](doc/PaymentMethodCashRequest.md)
- [PaymentMethodCashResponse](doc/PaymentMethodCashResponse.md)
- [PaymentMethodGeneralRequest](doc/PaymentMethodGeneralRequest.md)
- [PaymentMethodResponse](doc/PaymentMethodResponse.md)
- [PaymentMethodSpeiRecurrent](doc/PaymentMethodSpeiRecurrent.md)
- [PaymentMethodSpeiRequest](doc/PaymentMethodSpeiRequest.md)
- [PaymentMethodTokenRequest](doc/PaymentMethodTokenRequest.md)
- [Payout](doc/Payout.md)
- [PayoutMethod](doc/PayoutMethod.md)
- [PayoutOrder](doc/PayoutOrder.md)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.5
6.0.6
2 changes: 1 addition & 1 deletion config-dart.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"useEnumExtension": true,
"pubAuthor": "conekta",
"pubLibrary": "conekta",
"pubVersion": "6.0.5",
"pubVersion": "6.0.6",
"pubName": "conekta",
"pubRepository": "https://www.github.com/conekta/conekta-dart",
"pubHomepage" : "https://www.github.com/conekta/conekta-dart",
Expand Down
19 changes: 11 additions & 8 deletions doc/ChargeOrderResponsePaymentMethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,27 @@ 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** | **int** | | [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]
**accountType** | **String** | | [optional]
**brand** | **String** | | [optional]
**customerIpAddress** | **String** | | [optional]
**accountType** | **String** | Account type of the card | [optional]
**brand** | **String** | Brand of the card | [optional]
**contractId** | **String** | Id sent for recurrent charges. | [optional]
**country** | **String** | | [optional]
**expMonth** | **String** | | [optional]
**expYear** | **String** | | [optional]
**country** | **String** | Country of the card | [optional]
**expMonth** | **String** | Expiration month of the card | [optional]
**expYear** | **String** | Expiration year of the card | [optional]
**fraudIndicators** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional]
**issuer** | **String** | | [optional]
**last4** | **String** | | [optional]
**name** | **String** | | [optional]
**issuer** | **String** | Issuer of the card | [optional]
**last4** | **String** | Last 4 digits of the card | [optional]
**name** | **String** | Name of the cardholder | [optional]
**bank** | **String** | | [optional]
**clabe** | **String** | | [optional]
**description** | **String** | | [optional]
Expand Down
2 changes: 1 addition & 1 deletion doc/ChargeRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:conekta/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**amount** | **int** | | [optional]
**amount** | **int** | Amount to be charged in cents | [optional]
**paymentMethod** | [**ChargeRequestPaymentMethod**](ChargeRequestPaymentMethod.md) | |
**referenceId** | **String** | Custom reference to add to the charge | [optional]

Expand Down
8 changes: 7 additions & 1 deletion doc/ChargeRequestPaymentMethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ import 'package:conekta/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **String** | Type of payment method |
**cvc** | **String** | Optional, It is a value that allows identifying the security code of the card. Only for PCI merchants |
**expMonth** | **String** | Card expiration month |
**expYear** | **String** | Card expiration year |
**name** | **String** | Cardholder name |
**number** | **String** | Card number |
**customerIpAddress** | **String** | Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes | [optional]
**expiresAt** | **int** | Method expiration date as unix timestamp | [optional]
**monthlyInstallments** | **int** | How many months without interest to apply, it can be 3, 6, 9, 12 or 18 | [optional]
**type** | **String** | |
**tokenId** | **String** | | [optional]
**paymentSourceId** | **String** | | [optional]
**contractId** | **String** | Optional id sent to indicate the bank contract for recurrent card charges. | [optional]
Expand Down
8 changes: 4 additions & 4 deletions doc/ChargeResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Name | Type | Description | Notes
**deviceFingerprint** | **String** | | [optional]
**failureCode** | **String** | | [optional]
**failureMessage** | **String** | | [optional]
**id** | **String** | | [optional]
**livemode** | **bool** | | [optional]
**id** | **String** | Charge ID | [optional]
**livemode** | **bool** | Whether the charge was made in live mode or not | [optional]
**object** | **String** | | [optional]
**orderId** | **String** | | [optional]
**paidAt** | **int** | | [optional]
**orderId** | **String** | Order ID | [optional]
**paidAt** | **int** | Payment date | [optional]
**paymentMethod** | [**ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional]
**referenceId** | **String** | Reference ID of the charge | [optional]
**refunds** | [**ChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional]
Expand Down
19 changes: 11 additions & 8 deletions doc/ChargeResponsePaymentMethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,27 @@ 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** | **int** | | [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]
**accountType** | **String** | | [optional]
**brand** | **String** | | [optional]
**customerIpAddress** | **String** | | [optional]
**accountType** | **String** | Account type of the card | [optional]
**brand** | **String** | Brand of the card | [optional]
**contractId** | **String** | Id sent for recurrent charges. | [optional]
**country** | **String** | | [optional]
**expMonth** | **String** | | [optional]
**expYear** | **String** | | [optional]
**country** | **String** | Country of the card | [optional]
**expMonth** | **String** | Expiration month of the card | [optional]
**expYear** | **String** | Expiration year of the card | [optional]
**fraudIndicators** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional]
**issuer** | **String** | | [optional]
**last4** | **String** | | [optional]
**name** | **String** | | [optional]
**issuer** | **String** | Issuer of the card | [optional]
**last4** | **String** | Last 4 digits of the card | [optional]
**name** | **String** | Name of the cardholder | [optional]
**bank** | **String** | | [optional]
**clabe** | **String** | | [optional]
**description** | **String** | | [optional]
Expand Down
50 changes: 50 additions & 0 deletions doc/ChargesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**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 | Create charges
[**updateCharge**](ChargesApi.md#updatecharge) | **PUT** /charges/{id} | Update a charge


Expand Down Expand Up @@ -114,6 +115,55 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **ordersCreateCharges**
> ChargesOrderResponse ordersCreateCharges(id, chargeRequest, acceptLanguage, xChildCompanyId)

Create charges

Create charges for an existing orden

### Example
```dart
import 'package:conekta/api.dart';

final api = Conekta().getChargesApi();
final String id = 6307a60c41de27127515a575; // String | Identifier of the resource
final ChargeRequest chargeRequest = ; // ChargeRequest | requested field for a charge
final String acceptLanguage = es; // String | Use for knowing which language to use
final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case of a holding company, the company id of the child company to which will process the request.

try {
final response = api.ordersCreateCharges(id, chargeRequest, acceptLanguage, xChildCompanyId);
print(response);
} catch on DioException (e) {
print('Exception when calling ChargesApi->ordersCreateCharges: $e\n');
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| Identifier of the resource |
**chargeRequest** | [**ChargeRequest**](ChargeRequest.md)| requested field for a charge |
**acceptLanguage** | **String**| Use for knowing which language to use | [optional] [default to 'es']
**xChildCompanyId** | **String**| In the case of a holding company, the company id of the child company to which will process the request. | [optional]

### Return type

[**ChargesOrderResponse**](ChargesOrderResponse.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/vnd.conekta-v2.1.0+json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **updateCharge**
> ChargeResponse updateCharge(id, chargeUpdateRequest, acceptLanguage, xChildCompanyId)

Expand Down
8 changes: 4 additions & 4 deletions doc/ChargesDataResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Name | Type | Description | Notes
**deviceFingerprint** | **String** | | [optional]
**failureCode** | **String** | | [optional]
**failureMessage** | **String** | | [optional]
**id** | **String** | | [optional]
**livemode** | **bool** | | [optional]
**id** | **String** | Charge ID | [optional]
**livemode** | **bool** | Whether the charge was made in live mode or not | [optional]
**object** | **String** | | [optional]
**orderId** | **String** | | [optional]
**paidAt** | **int** | | [optional]
**orderId** | **String** | Order ID | [optional]
**paidAt** | **int** | Payment date | [optional]
**paymentMethod** | [**ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional]
**referenceId** | **String** | Reference ID of the charge | [optional]
**refunds** | [**ChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional]
Expand Down
17 changes: 17 additions & 0 deletions doc/ChargesOrderResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# conekta.model.ChargesOrderResponse

## Load the model package
```dart
import 'package:conekta/api.dart';
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**hasMore** | **bool** | Indicates if there are more pages to be requested |
**object** | **String** | Object type, in this case is list |
**data** | [**BuiltList<ChargesOrderResponseAllOfData>**](ChargesOrderResponseAllOfData.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


32 changes: 32 additions & 0 deletions doc/ChargesOrderResponseAllOfData.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# conekta.model.ChargesOrderResponseAllOfData

## Load the model package
```dart
import 'package:conekta/api.dart';
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**amount** | **int** | | [optional]
**channel** | [**ChargeResponseChannel**](ChargeResponseChannel.md) | | [optional]
**createdAt** | **int** | | [optional]
**currency** | **String** | | [optional]
**customerId** | **String** | | [optional]
**description** | **String** | | [optional]
**deviceFingerprint** | **String** | | [optional]
**failureCode** | **String** | | [optional]
**failureMessage** | **String** | | [optional]
**id** | **String** | Charge ID | [optional]
**livemode** | **bool** | Whether the charge was made in live mode or not | [optional]
**object** | **String** | | [optional]
**orderId** | **String** | Order ID | [optional]
**paidAt** | **int** | Payment date | [optional]
**paymentMethod** | [**ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional]
**referenceId** | **String** | Reference ID of the charge | [optional]
**refunds** | [**ChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional]
**status** | **String** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


1 change: 1 addition & 0 deletions doc/Checkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**expiresAt** | **int** | It is the time when the link will expire. It is expressed in seconds since the Unix epoch. The valid range is from 2 to 365 days (the valid range will be taken from the next day of the creation date at 00:01 hrs) |
**monthlyInstallmentsEnabled** | **bool** | This flag allows you to specify if months without interest will be active. | [optional]
**monthlyInstallmentsOptions** | **BuiltList<int>** | This field allows you to specify the number of months without interest. | [optional]
**threeDsMode** | **String** | Indicates the 3DS2 mode for the order, either smart or strict. | [optional]
**name** | **String** | Reason for charge |
**needsShippingContact** | **bool** | This flag allows you to fill in the shipping information at checkout. | [optional]
**onDemandEnabled** | **bool** | This flag allows you to specify if the link will be on demand. | [optional]
Expand Down
1 change: 1 addition & 0 deletions doc/CheckoutRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Name | Type | Description | Notes
**failureUrl** | **String** | Redirection url back to the site in case of failed payment, applies only to HostedPayment. | [optional]
**monthlyInstallmentsEnabled** | **bool** | | [optional]
**monthlyInstallmentsOptions** | **BuiltList<int>** | | [optional]
**maxFailedRetries** | **int** | Number of retries allowed before the checkout is marked as failed | [optional]
**name** | **String** | Reason for payment | [optional]
**onDemandEnabled** | **bool** | | [optional]
**redirectionTime** | **int** | number of seconds to wait before redirecting to the success_url | [optional]
Expand Down
Loading