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

AI-122: Regenerate SDK #121

Merged
merged 2 commits into from
Dec 17, 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
4 changes: 4 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ docs/ChargeResponseRefundsData.md
docs/ChargeUpdateRequest.md
docs/ChargesApi.md
docs/ChargesDataResponse.md
docs/ChargesOrderResponse.md
docs/ChargesOrderResponseAllOfData.md
docs/Checkout.md
docs/CheckoutOrderTemplate.md
docs/CheckoutOrderTemplateCustomerInfo.md
Expand Down Expand Up @@ -256,6 +258,8 @@ lib/conekta/models/charge_response_refunds.rb
lib/conekta/models/charge_response_refunds_data.rb
lib/conekta/models/charge_update_request.rb
lib/conekta/models/charges_data_response.rb
lib/conekta/models/charges_order_response.rb
lib/conekta/models/charges_order_response_all_of_data.rb
lib/conekta/models/checkout.rb
lib/conekta/models/checkout_order_template.rb
lib/conekta/models/checkout_order_template_customer_info.rb
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g

- API version: 2.1.0
- Package version: 6.0.4
- Build date: 2024-10-11T14:29:25.812959596Z[Etc/UTC]
- Build date: 2024-12-17T02:22:54.643378180Z[Etc/UTC]
- Generator version: 7.5.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
For more information, please visit [https://github.com/conekta/openapi/issues](https://github.com/conekta/openapi/issues)
Expand Down Expand Up @@ -105,6 +105,7 @@ Class | Method | HTTP request | Description
*Conekta::BalancesApi* | [**get_balance**](docs/BalancesApi.md#get_balance) | **GET** /balance | Get a company's balance
*Conekta::ChargesApi* | [**get_charges**](docs/ChargesApi.md#get_charges) | **GET** /charges | Get A List of Charges
*Conekta::ChargesApi* | [**orders_create_charge**](docs/ChargesApi.md#orders_create_charge) | **POST** /orders/{id}/charges | Create charge
*Conekta::ChargesApi* | [**orders_create_charges**](docs/ChargesApi.md#orders_create_charges) | **POST** /orders/{id}/add_charges | Create charges
*Conekta::ChargesApi* | [**update_charge**](docs/ChargesApi.md#update_charge) | **PUT** /charges/{id} | Update a charge
*Conekta::CompaniesApi* | [**get_companies**](docs/CompaniesApi.md#get_companies) | **GET** /companies | Get List of Companies
*Conekta::CompaniesApi* | [**get_company**](docs/CompaniesApi.md#get_company) | **GET** /companies/{id} | Get Company
Expand Down Expand Up @@ -143,6 +144,7 @@ Class | Method | HTTP request | Description
*Conekta::PaymentMethodsApi* | [**delete_customer_payment_methods**](docs/PaymentMethodsApi.md#delete_customer_payment_methods) | **DELETE** /customers/{id}/payment_sources/{payment_method_id} | Delete Payment Method
*Conekta::PaymentMethodsApi* | [**get_customer_payment_methods**](docs/PaymentMethodsApi.md#get_customer_payment_methods) | **GET** /customers/{id}/payment_sources | Get Payment Methods
*Conekta::PaymentMethodsApi* | [**update_customer_payment_methods**](docs/PaymentMethodsApi.md#update_customer_payment_methods) | **PUT** /customers/{id}/payment_sources/{payment_method_id} | Update Payment Method
*Conekta::PayoutOrdersApi* | [**cancel_payout_order_by_id**](docs/PayoutOrdersApi.md#cancel_payout_order_by_id) | **PUT** /payout_orders/{id}/cancel | Cancel Payout Order
*Conekta::PayoutOrdersApi* | [**create_payout_order**](docs/PayoutOrdersApi.md#create_payout_order) | **POST** /payout_orders | Create payout order
*Conekta::PayoutOrdersApi* | [**get_payout_order_by_id**](docs/PayoutOrdersApi.md#get_payout_order_by_id) | **GET** /payout_orders/{id} | Get Payout Order
*Conekta::PayoutOrdersApi* | [**get_payout_orders**](docs/PayoutOrdersApi.md#get_payout_orders) | **GET** /payout_orders | Get a list of Payout Orders
Expand Down Expand Up @@ -209,6 +211,8 @@ Class | Method | HTTP request | Description
- [Conekta::ChargeResponseRefundsData](docs/ChargeResponseRefundsData.md)
- [Conekta::ChargeUpdateRequest](docs/ChargeUpdateRequest.md)
- [Conekta::ChargesDataResponse](docs/ChargesDataResponse.md)
- [Conekta::ChargesOrderResponse](docs/ChargesOrderResponse.md)
- [Conekta::ChargesOrderResponseAllOfData](docs/ChargesOrderResponseAllOfData.md)
- [Conekta::Checkout](docs/Checkout.md)
- [Conekta::CheckoutOrderTemplate](docs/CheckoutOrderTemplate.md)
- [Conekta::CheckoutOrderTemplateCustomerInfo](docs/CheckoutOrderTemplateCustomerInfo.md)
Expand Down
78 changes: 78 additions & 0 deletions docs/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*
| ------ | ------------ | ----------- |
| [**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 |
| [**orders_create_charges**](ChargesApi.md#orders_create_charges) | **POST** /orders/{id}/add_charges | Create charges |
| [**update_charge**](ChargesApi.md#update_charge) | **PUT** /charges/{id} | Update a charge |


Expand Down Expand Up @@ -165,6 +166,83 @@ end
- **Accept**: application/vnd.conekta-v2.1.0+json


## orders_create_charges

> <ChargesOrderResponse> orders_create_charges(id, charge_request, opts)

Create charges

Create charges for an existing orden

### 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_request = Conekta::ChargeRequest.new({payment_method: Conekta::PaymentMethodCardRequest.new({type: 'card | cash | spei', cvc: '198', exp_month: '12', exp_year: '2025', name: 'John Doe', number: '4242424242424242'})}) # ChargeRequest | requested field for 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
# Create charges
result = api_instance.orders_create_charges(id, charge_request, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling ChargesApi->orders_create_charges: #{e}"
end
```

#### Using the orders_create_charges_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> <Array(<ChargesOrderResponse>, Integer, Hash)> orders_create_charges_with_http_info(id, charge_request, opts)

```ruby
begin
# Create charges
data, status_code, headers = api_instance.orders_create_charges_with_http_info(id, charge_request, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ChargesOrderResponse>
rescue Conekta::ApiError => e
puts "Error when calling ChargesApi->orders_create_charges_with_http_info: #{e}"
end
```

### Parameters

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **id** | **String** | Identifier of the resource | |
| **charge_request** | [**ChargeRequest**](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

[**ChargesOrderResponse**](ChargesOrderResponse.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)
Expand Down
22 changes: 22 additions & 0 deletions docs/ChargesOrderResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Conekta::ChargesOrderResponse

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **has_more** | **Boolean** | Indicates if there are more pages to be requested | |
| **object** | **String** | Object type, in this case is list | |
| **data** | [**Array&lt;ChargesOrderResponseAllOfData&gt;**](ChargesOrderResponseAllOfData.md) | | [optional] |

## Example

```ruby
require 'conekta'

instance = Conekta::ChargesOrderResponse.new(
has_more: false,
object: list,
data: null
)
```

52 changes: 52 additions & 0 deletions docs/ChargesOrderResponseAllOfData.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Conekta::ChargesOrderResponseAllOfData

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **amount** | **Integer** | | [optional] |
| **channel** | [**ChargeResponseChannel**](ChargeResponseChannel.md) | | [optional] |
| **created_at** | **Integer** | | [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** | **Boolean** | Whether the charge was made in live mode or not | [optional] |
| **object** | **String** | | [optional] |
| **order_id** | **String** | Order ID | [optional] |
| **paid_at** | **Integer** | Payment date | [optional] |
| **payment_method** | [**ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional] |
| **reference_id** | **String** | Reference ID of the charge | [optional] |
| **refunds** | [**ChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional] |
| **status** | **String** | | [optional] |

## Example

```ruby
require 'conekta'

instance = Conekta::ChargesOrderResponseAllOfData.new(
amount: 4321,
channel: null,
created_at: 1676386026,
currency: MXN,
customer_id: null,
description: Payment from order,
device_fingerprint: 6FR3chaU4Y1nGAW5NAGd1rcjAKa142Ba,
failure_code: suspected_fraud,
failure_message: Este cargo ha sido declinado porque el comportamiento del comprador es sospechoso.,
id: 63efa757cf65380001aec040,
livemode: false,
object: charge,
order_id: ord_2tN73UdUSNrYRPD9r,
paid_at: 1676390742,
payment_method: null,
reference_id: ref_2tN73UdUSNrYRPD9r,
refunds: null,
status: pending_payment
)
```

2 changes: 2 additions & 0 deletions docs/CheckoutRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
| **failure_url** | **String** | Redirection url back to the site in case of failed payment, applies only to HostedPayment. | [optional] |
| **monthly_installments_enabled** | **Boolean** | | [optional] |
| **monthly_installments_options** | **Array&lt;Integer&gt;** | | [optional] |
| **max_failed_retries** | **Integer** | Number of retries allowed before the checkout is marked as failed | [optional] |
| **name** | **String** | Reason for payment | [optional] |
| **on_demand_enabled** | **Boolean** | | [optional] |
| **redirection_time** | **Integer** | number of seconds to wait before redirecting to the success_url | [optional] |
Expand All @@ -26,6 +27,7 @@ instance = Conekta::CheckoutRequest.new(
failure_url: null,
monthly_installments_enabled: false,
monthly_installments_options: [3,6,12],
max_failed_retries: 3,
name: null,
on_demand_enabled: true,
redirection_time: 10,
Expand Down
4 changes: 4 additions & 0 deletions docs/Customer.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
| **antifraud_info** | [**CustomerAntifraudInfo**](CustomerAntifraudInfo.md) | | [optional] |
| **corporate** | **Boolean** | It is a value that allows identifying if the email is corporate or not. | [optional][default to false] |
| **custom_reference** | **String** | It is an undefined value. | [optional] |
| **date_of_birth** | **String** | It is a parameter that allows to identify the date of birth of the client. | [optional] |
| **email** | **String** | An email address is a series of customizable characters followed by a universal Internet symbol, the at symbol (@), the name of a host server, and a web domain ending (.mx, .com, .org, . net, etc). | |
| **default_payment_source_id** | **String** | It is a parameter that allows to identify in the response, the Conekta ID of a payment method (payment_id) | [optional] |
| **default_shipping_contact_id** | **String** | It is a parameter that allows to identify in the response, the Conekta ID of the shipping address (shipping_contact) | [optional] |
| **fiscal_entities** | [**Array&lt;CustomerFiscalEntitiesRequest&gt;**](CustomerFiscalEntitiesRequest.md) | | [optional] |
| **metadata** | **Hash&lt;String, Object&gt;** | | [optional] |
| **name** | **String** | Client&#39;s name | |
| **national_id** | **String** | It is a parameter that allows to identify the national identification number of the client. | [optional] |
| **payment_sources** | [**Array&lt;CustomerPaymentMethodsRequest&gt;**](CustomerPaymentMethodsRequest.md) | Contains details of the payment methods that the customer has active or has used in Conekta | [optional] |
| **phone** | **String** | Is the customer&#39;s phone number | |
| **plan_id** | **String** | Contains the ID of a plan, which could together with name, email and phone create a client directly to a subscription | [optional] |
Expand All @@ -28,12 +30,14 @@ instance = Conekta::Customer.new(
antifraud_info: null,
corporate: false,
custom_reference: null,
date_of_birth: 24/07/1992,
email: [email protected],
default_payment_source_id: src_1a2b3c4d5e6f7g8h,
default_shipping_contact_id: ship_cont_1a2b3c4d5e6f7g8h,
fiscal_entities: null,
metadata: null,
name: miguel,
national_id: HEGG560427MVZRRL04,
payment_sources: null,
phone: +5215555555555,
plan_id: plan_987234823,
Expand Down
4 changes: 4 additions & 0 deletions docs/CustomerResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
| **corporate** | **Boolean** | true if the customer is a company | [optional] |
| **created_at** | **Integer** | Creation date of the object | |
| **custom_reference** | **String** | Custom reference | [optional] |
| **date_of_birth** | **String** | It is a parameter that allows to identify the date of birth of the client. | [optional] |
| **default_fiscal_entity_id** | **String** | | [optional] |
| **default_shipping_contact_id** | **String** | | [optional] |
| **default_payment_source_id** | **String** | | [optional] |
Expand All @@ -16,6 +17,7 @@
| **id** | **String** | Customer&#39;s ID | |
| **livemode** | **Boolean** | true if the object exists in live mode or the value false if the object exists in test mode | |
| **name** | **String** | Customer&#39;s name | |
| **national_id** | **String** | It is a parameter that allows to identify the national identification number of the client. | [optional] |
| **metadata** | **Hash&lt;String, Object&gt;** | | [optional] |
| **object** | **String** | | |
| **payment_sources** | [**CustomerPaymentMethodsResponse**](CustomerPaymentMethodsResponse.md) | | [optional] |
Expand All @@ -33,6 +35,7 @@ instance = Conekta::CustomerResponse.new(
corporate: null,
created_at: 1485151007,
custom_reference: custom_reference,
date_of_birth: 24/07/1992,
default_fiscal_entity_id: fis_ent_2tKqqAfqPi21oCmEJ,
default_shipping_contact_id: ship_cont_2tKZsTYcsryyu7Ah8,
default_payment_source_id: src_2tHJfJ79KyUwpxTio,
Expand All @@ -41,6 +44,7 @@ instance = Conekta::CustomerResponse.new(
id: cus_2tHJfJ79KyUwpxTik,
livemode: true,
name: Felipe,
national_id: HEGG560427MVZRRL04,
metadata: null,
object: customer,
payment_sources: null,
Expand Down
2 changes: 2 additions & 0 deletions docs/OrderResponseCheckout.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
| **id** | **String** | | [optional] |
| **is_redirect_on_failure** | **Boolean** | | [optional] |
| **livemode** | **Boolean** | | [optional] |
| **max_failed_retries** | **Integer** | Number of retries allowed before the checkout is marked as failed | [optional] |
| **metadata** | **Hash&lt;String, Object&gt;** | | [optional] |
| **monthly_installments_enabled** | **Boolean** | | [optional] |
| **monthly_installments_options** | **Array&lt;Integer&gt;** | | [optional] |
Expand Down Expand Up @@ -48,6 +49,7 @@ instance = Conekta::OrderResponseCheckout.new(
id: 6fca054a-8519-4c43-971e-cea35cc519bb,
is_redirect_on_failure: false,
livemode: false,
max_failed_retries: 3,
metadata: null,
monthly_installments_enabled: false,
monthly_installments_options: null,
Expand Down
4 changes: 4 additions & 0 deletions docs/PaymentMethodCash.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
| ---- | ---- | ----------- | ----- |
| **type** | **String** | | [optional] |
| **object** | **String** | | |
| **agreement** | **String** | Agreement ID | [optional] |
| **auth_code** | **Integer** | | [optional] |
| **cashier_id** | **String** | | [optional] |
| **reference** | **String** | | [optional] |
| **barcode_url** | **String** | | [optional] |
| **expires_at** | **Integer** | | [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 All @@ -24,11 +26,13 @@ require 'conekta'
instance = Conekta::PaymentMethodCash.new(
type: null,
object: payment_source,
agreement: agreement_2tN73UdUSNrYRPD9r,
auth_code: 542563,
cashier_id: OINM01010,
reference: 93000262276908,
barcode_url: https://pt-common-s3-stg.s3.amazonaws.com/644ebf80f2243197aad6cd8810375b905b613dbe.png?X-Amz-Algorithm&#x3D;AWS4-HMAC-SHA256&amp;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3QzDg7%2FWeBjqmAbnPOlGfysjrDdvHyG7HVnaX02kdG%2BI3Q4PFOO4Mjaa3ocpjcfPT70%2BZ5a%2FSv5vP0jDLGrLToeM9%2BAUlNepptICRu23a1tLGW4ri0twPA%2FZ4JDTtUUUgdblyG8bKpcUTNp4oOsdmLLBz3FVyr4c2xQbDZSu2zYOtoOxB18W0AC6kIbsMWVU55Bf0mBhPeBWxGrtM4Kw1SgHHlt%2F8vetQi2OwtUcg08c%3D&amp;X-Amz-SignedHeaders&#x3D;host&amp;X-Amz-Signature&#x3D;d06dfa41550003359f2aabc8006063a80dfd806a13a54d244024946a76aa9abc,
expires_at: 0,
product_type: bbva_cash_in,
service_name: OxxoPay,
store: 10MON50EDI,
store_name: OXXO,
Expand Down
2 changes: 1 addition & 1 deletion docs/PaymentMethodTokenRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require 'conekta'

instance = Conekta::PaymentMethodTokenRequest.new(
type: card | cash | spei,
token_id: test_32hj4g234as
token_id: tok_32hj4g234as
)
```

Loading
Loading