Skip to content

Commit

Permalink
changelog: added new files, updated versions in composer.json and con…
Browse files Browse the repository at this point in the history
…fig-php.json, added a new API endpoint for creating charges, updated user agent version to 6.0.10 (#303)
  • Loading branch information
fcarrero authored Oct 28, 2024
1 parent 2ef9b46 commit 66d27fd
Show file tree
Hide file tree
Showing 221 changed files with 2,669 additions and 236 deletions.
4 changes: 4 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ docs/Model/ChargeResponseRefunds.md
docs/Model/ChargeResponseRefundsData.md
docs/Model/ChargeUpdateRequest.md
docs/Model/ChargesDataResponse.md
docs/Model/ChargesOrderResponse.md
docs/Model/ChargesOrderResponseAllOfData.md
docs/Model/Checkout.md
docs/Model/CheckoutOrderTemplate.md
docs/Model/CheckoutOrderTemplateCustomerInfo.md
Expand Down Expand Up @@ -253,6 +255,8 @@ lib/Model/ChargeResponseRefunds.php
lib/Model/ChargeResponseRefundsData.php
lib/Model/ChargeUpdateRequest.php
lib/Model/ChargesDataResponse.php
lib/Model/ChargesOrderResponse.php
lib/Model/ChargesOrderResponseAllOfData.php
lib/Model/Checkout.php
lib/Model/CheckoutOrderTemplate.php
lib/Model/CheckoutOrderTemplateCustomerInfo.php
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.9.0
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ php:
rm -rf docs && \
rm -rf lib/Model && \
docker run --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli:v7.5.0 generate \
-v ${PWD}:/local openapitools/openapi-generator-cli:v7.9.0 generate \
-i https://raw.githubusercontent.com/conekta/openapi/main/_build/api.yaml \
-g php \
-o /local \
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Class | Method | HTTP request | Description
*BalancesApi* | [**getBalance**](docs/Api/BalancesApi.md#getbalance) | **GET** /balance | Get a company's balance
*ChargesApi* | [**getCharges**](docs/Api/ChargesApi.md#getcharges) | **GET** /charges | Get A List of Charges
*ChargesApi* | [**ordersCreateCharge**](docs/Api/ChargesApi.md#orderscreatecharge) | **POST** /orders/{id}/charges | Create charge
*ChargesApi* | [**ordersCreateCharges**](docs/Api/ChargesApi.md#orderscreatecharges) | **POST** /orders/{id}/add_charges | Create charges
*ChargesApi* | [**updateCharge**](docs/Api/ChargesApi.md#updatecharge) | **PUT** /charges/{id} | Update a charge
*CompaniesApi* | [**getCompanies**](docs/Api/CompaniesApi.md#getcompanies) | **GET** /companies | Get List of Companies
*CompaniesApi* | [**getCompany**](docs/Api/CompaniesApi.md#getcompany) | **GET** /companies/{id} | Get Company
Expand Down Expand Up @@ -195,6 +196,8 @@ Class | Method | HTTP request | Description
- [ChargeResponseRefundsData](docs/Model/ChargeResponseRefundsData.md)
- [ChargeUpdateRequest](docs/Model/ChargeUpdateRequest.md)
- [ChargesDataResponse](docs/Model/ChargesDataResponse.md)
- [ChargesOrderResponse](docs/Model/ChargesOrderResponse.md)
- [ChargesOrderResponseAllOfData](docs/Model/ChargesOrderResponseAllOfData.md)
- [Checkout](docs/Model/Checkout.md)
- [CheckoutOrderTemplate](docs/Model/CheckoutOrderTemplate.md)
- [CheckoutOrderTemplateCustomerInfo](docs/Model/CheckoutOrderTemplateCustomerInfo.md)
Expand Down Expand Up @@ -377,6 +380,6 @@ [email protected]
This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: `2.1.0`
- Package version: `6.0.9`
- Generator version: `7.5.0`
- Package version: `6.0.10`
- Generator version: `7.9.0`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.9
6.0.10
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "conekta/conekta-php",
"version": "6.0.9",
"version": "6.0.10",
"description": "Conekta PHP Library",
"type": "library",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions config-php.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"packageName": "conekta",
"generateSourceCodeOnly": "false",
"artifactVersion": "6.0.9",
"artifactVersion": "6.0.10",
"packageUrl": "https://developers.conekta.com/",
"projectName": "conekta-php",
"appDescriptionV2" : "Conekta PHP Library",
"useOneOfDiscriminatorLookup" : true,
"nonCompliantUseDiscriminatorIfCompositionFails" : false,
"httpUserAgent": "Conekta/v2 PhpBindings/6.0.9",
"httpUserAgent": "Conekta/v2 PhpBindings/6.0.10",
"packageAuthors" : "[email protected]",
"files": {
"/local/CODE_OF_CONDUCT.md" : {},
Expand Down
67 changes: 67 additions & 0 deletions docs/Api/ChargesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All URIs are relative to https://api.conekta.io, except if the operation defines
| ------------- | ------------- | ------------- |
| [**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 @@ -143,6 +144,72 @@ try {
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `ordersCreateCharges()`

```php
ordersCreateCharges($id, $charge_request, $accept_language, $x_child_company_id): \Conekta\Model\ChargesOrderResponse
```

Create charges

Create charges for an existing orden

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Conekta\Api\ChargesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 6307a60c41de27127515a575; // string | Identifier of the resource
$charge_request = new \Conekta\Model\ChargeRequest(); // \Conekta\Model\ChargeRequest | requested field for a charge
$accept_language = es; // string | Use for knowing which language to use
$x_child_company_id = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request.

try {
$result = $apiInstance->ordersCreateCharges($id, $charge_request, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ChargesApi->ordersCreateCharges: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Identifier of the resource | |
| **charge_request** | [**\Conekta\Model\ChargeRequest**](../Model/ChargeRequest.md)| requested field for a charge | |
| **accept_language** | **string**| Use for knowing which language to use | [optional] [default to &#39;es&#39;] |
| **x_child_company_id** | **string**| In the case of a holding company, the company id of the child company to which will process the request. | [optional] |

### Return type

[**\Conekta\Model\ChargesOrderResponse**](../Model/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#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `updateCharge()`

```php
Expand Down
2 changes: 2 additions & 0 deletions docs/Model/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]
**auth_code** | **string** | | [optional]
**cashier_id** | **string** | | [optional]
**reference** | **string** | | [optional]
**barcode_url** | **string** | | [optional]
**expires_at** | **int** | | [optional]
**product_type** | **string** | Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in, etc. | [optional]
**service_name** | **string** | | [optional]
**store** | **string** | | [optional]
**store_name** | **string** | | [optional]
Expand Down
2 changes: 2 additions & 0 deletions docs/Model/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]
**auth_code** | **string** | | [optional]
**cashier_id** | **string** | | [optional]
**reference** | **string** | | [optional]
**barcode_url** | **string** | | [optional]
**expires_at** | **int** | | [optional]
**product_type** | **string** | Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in, etc. | [optional]
**service_name** | **string** | | [optional]
**store** | **string** | | [optional]
**store_name** | **string** | | [optional]
Expand Down
11 changes: 11 additions & 0 deletions docs/Model/ChargesOrderResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# # ChargesOrderResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**has_more** | **bool** | Indicates if there are more pages to be requested |
**object** | **string** | Object type, in this case is list |
**data** | [**\Conekta\Model\ChargesOrderResponseAllOfData[]**](ChargesOrderResponseAllOfData.md) | | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
26 changes: 26 additions & 0 deletions docs/Model/ChargesOrderResponseAllOfData.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# # ChargesOrderResponseAllOfData

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**amount** | **int** | | [optional]
**channel** | [**\Conekta\Model\ChargeResponseChannel**](ChargeResponseChannel.md) | | [optional]
**created_at** | **int** | | [optional]
**currency** | **string** | | [optional]
**customer_id** | **string** | | [optional]
**description** | **string** | | [optional]
**device_fingerprint** | **string** | | [optional]
**failure_code** | **string** | | [optional]
**failure_message** | **string** | | [optional]
**id** | **string** | Charge ID | [optional]
**livemode** | **bool** | Whether the charge was made in live mode or not | [optional]
**object** | **string** | | [optional]
**order_id** | **string** | Order ID | [optional]
**paid_at** | **int** | Payment date | [optional]
**payment_method** | [**\Conekta\Model\ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional]
**reference_id** | **string** | Reference ID of the charge | [optional]
**refunds** | [**\Conekta\Model\ChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional]
**status** | **string** | | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
1 change: 1 addition & 0 deletions docs/Model/CheckoutRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**failure_url** | **string** | Redirection url back to the site in case of failed payment, applies only to HostedPayment. | [optional]
**monthly_installments_enabled** | **bool** | | [optional]
**monthly_installments_options** | **int[]** | | [optional]
**max_failed_retries** | **int** | Number of retries allowed before the checkout is marked as failed | [optional]
**name** | **string** | Reason for payment | [optional]
**on_demand_enabled** | **bool** | | [optional]
**redirection_time** | **int** | number of seconds to wait before redirecting to the success_url | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/Model/OrderResponseCheckout.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Name | Type | Description | Notes
**id** | **string** | | [optional]
**is_redirect_on_failure** | **bool** | | [optional]
**livemode** | **bool** | | [optional]
**max_failed_retries** | **int** | Number of retries allowed before the checkout is marked as failed | [optional]
**metadata** | **array<string,mixed>** | | [optional]
**monthly_installments_enabled** | **bool** | | [optional]
**monthly_installments_options** | **int[]** | | [optional]
Expand Down
2 changes: 2 additions & 0 deletions docs/Model/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]
**auth_code** | **int** | | [optional]
**cashier_id** | **string** | | [optional]
**reference** | **string** | | [optional]
**barcode_url** | **string** | | [optional]
**expires_at** | **int** | | [optional]
**product_type** | **string** | Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in, etc. | [optional]
**service_name** | **string** | | [optional]
**store** | **string** | | [optional]
**store_name** | **string** | | [optional]
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/AntifraudApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* The version of the OpenAPI document: 2.1.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* Generator version: 7.5.0
* Generator version: 7.9.0
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/ApiKeysApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* The version of the OpenAPI document: 2.1.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* Generator version: 7.5.0
* Generator version: 7.9.0
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/BalancesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* The version of the OpenAPI document: 2.1.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* Generator version: 7.5.0
* Generator version: 7.9.0
*/

/**
Expand Down
Loading

0 comments on commit 66d27fd

Please sign in to comment.