docs/ChargesApi.md in conekta-6.0.0 vs docs/ChargesApi.md in conekta-6.0.1

- old
+ new

@@ -4,10 +4,11 @@ | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**get_charges**](ChargesApi.md#get_charges) | **GET** /charges | Get A List of Charges | | [**orders_create_charge**](ChargesApi.md#orders_create_charge) | **POST** /orders/{id}/charges | Create charge | +| [**update_charge**](ChargesApi.md#update_charge) | **PUT** /charges/{id} | Update a charge | ## get_charges > <GetChargesResponse> get_charges(opts) @@ -151,9 +152,84 @@ | **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 [**ChargeOrderResponse**](ChargeOrderResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/vnd.conekta-v2.1.0+json + + +## update_charge + +> <ChargeResponse> update_charge(id, charge_update_request, opts) + +Update a charge + +### Examples + +```ruby +require 'time' +require 'conekta' +# setup authorization +Conekta.configure do |config| + # Configure Bearer authorization: bearerAuth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = Conekta::ChargesApi.new +id = '6307a60c41de27127515a575' # String | Identifier of the resource +charge_update_request = Conekta::ChargeUpdateRequest.new # ChargeUpdateRequest | requested field for update a charge +opts = { + 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. +} + +begin + # Update a charge + result = api_instance.update_charge(id, charge_update_request, opts) + p result +rescue Conekta::ApiError => e + puts "Error when calling ChargesApi->update_charge: #{e}" +end +``` + +#### Using the update_charge_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> <Array(<ChargeResponse>, Integer, Hash)> update_charge_with_http_info(id, charge_update_request, opts) + +```ruby +begin + # Update a charge + data, status_code, headers = api_instance.update_charge_with_http_info(id, charge_update_request, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => <ChargeResponse> +rescue Conekta::ApiError => e + puts "Error when calling ChargesApi->update_charge_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Identifier of the resource | | +| **charge_update_request** | [**ChargeUpdateRequest**](ChargeUpdateRequest.md) | requested field for update 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 + +[**ChargeResponse**](ChargeResponse.md) ### Authorization [bearerAuth](../README.md#bearerAuth)