Skip to content

Commit

Permalink
AI-64 update template by new attribute CustomerIpAddress (#119)
Browse files Browse the repository at this point in the history
* AI-64 update template by new attribute CustomerIpAddress

* AI-64 update template by new attribute CustomerIpAddress

* AI-64 fix charge test

* AI-64 fix charge test

* AI-64 fix charge test
  • Loading branch information
jalozanot-conekta authored Oct 11, 2024
1 parent 4eb2f85 commit 453f765
Show file tree
Hide file tree
Showing 43 changed files with 1,073 additions and 357 deletions.
4 changes: 4 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,11 @@ docs/PaymentMethodCardResponse.md
docs/PaymentMethodCash.md
docs/PaymentMethodCashRequest.md
docs/PaymentMethodCashResponse.md
docs/PaymentMethodGeneralRequest.md
docs/PaymentMethodResponse.md
docs/PaymentMethodSpeiRecurrent.md
docs/PaymentMethodSpeiRequest.md
docs/PaymentMethodTokenRequest.md
docs/PaymentMethodsApi.md
docs/Payout.md
docs/PayoutMethod.md
Expand Down Expand Up @@ -354,9 +356,11 @@ lib/conekta/models/payment_method_card_response.rb
lib/conekta/models/payment_method_cash.rb
lib/conekta/models/payment_method_cash_request.rb
lib/conekta/models/payment_method_cash_response.rb
lib/conekta/models/payment_method_general_request.rb
lib/conekta/models/payment_method_response.rb
lib/conekta/models/payment_method_spei_recurrent.rb
lib/conekta/models/payment_method_spei_request.rb
lib/conekta/models/payment_method_token_request.rb
lib/conekta/models/payout.rb
lib/conekta/models/payout_method.rb
lib/conekta/models/payout_order.rb
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Conekta sdk
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 2.1.0
- Package version: 6.0.3
- Build date: 2024-04-29T14:11:53.612104515Z[Etc/UTC]
- Package version: 6.0.4
- Build date: 2024-10-11T14:29:25.812959596Z[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 All @@ -26,16 +26,16 @@ gem build conekta.gemspec
Then either install the gem locally:

```shell
gem install ./conekta-6.0.3.gem
gem install ./conekta-6.0.4.gem
```

(for development, run `gem install --dev ./conekta-6.0.3.gem` to install the development dependencies)
(for development, run `gem install --dev ./conekta-6.0.4.gem` to install the development dependencies)

or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).

Finally add this to the Gemfile:

gem 'conekta', '~> 6.0.3'
gem 'conekta', '~> 6.0.4'

### Install from Git

Expand Down Expand Up @@ -309,9 +309,11 @@ Class | Method | HTTP request | Description
- [Conekta::PaymentMethodCash](docs/PaymentMethodCash.md)
- [Conekta::PaymentMethodCashRequest](docs/PaymentMethodCashRequest.md)
- [Conekta::PaymentMethodCashResponse](docs/PaymentMethodCashResponse.md)
- [Conekta::PaymentMethodGeneralRequest](docs/PaymentMethodGeneralRequest.md)
- [Conekta::PaymentMethodResponse](docs/PaymentMethodResponse.md)
- [Conekta::PaymentMethodSpeiRecurrent](docs/PaymentMethodSpeiRecurrent.md)
- [Conekta::PaymentMethodSpeiRequest](docs/PaymentMethodSpeiRequest.md)
- [Conekta::PaymentMethodTokenRequest](docs/PaymentMethodTokenRequest.md)
- [Conekta::Payout](docs/Payout.md)
- [Conekta::PayoutMethod](docs/PayoutMethod.md)
- [Conekta::PayoutOrder](docs/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.3
6.0.4
2 changes: 1 addition & 1 deletion config-ruby.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"gemAuthor": "Conekta",
"gemName" : "conekta",
"gemLicense": "MIT",
"gemVersion": "6.0.3",
"gemVersion": "6.0.4",
"hideGenerationTimestamp": false,
"moduleName": "Conekta",
"gemSummary" : "This library provides https://api.conekta.io operations",
Expand Down
2 changes: 1 addition & 1 deletion docs/ChargeRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **amount** | **Integer** | | [optional] |
| **amount** | **Integer** | Amount to be charged in cents | [optional] |
| **payment_method** | [**ChargeRequestPaymentMethod**](ChargeRequestPaymentMethod.md) | | |
| **reference_id** | **String** | Custom reference to add to the charge | [optional] |

Expand Down
57 changes: 39 additions & 18 deletions docs/ChargeRequestPaymentMethod.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,49 @@
# Conekta::ChargeRequestPaymentMethod

## Properties
## Class instance methods

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **expires_at** | **Integer** | Method expiration date as unix timestamp | [optional] |
| **monthly_installments** | **Integer** | How many months without interest to apply, it can be 3, 6, 9, 12 or 18 | [optional] |
| **type** | **String** | | |
| **token_id** | **String** | | [optional] |
| **payment_source_id** | **String** | | [optional] |
| **contract_id** | **String** | Optional id sent to indicate the bank contract for recurrent card charges. | [optional] |
### `openapi_one_of`

## Example
Returns the list of classes defined in oneOf.

#### Example

```ruby
require 'conekta'

Conekta::ChargeRequestPaymentMethod.openapi_one_of
# =>
# [
# :'PaymentMethodCardRequest',
# :'PaymentMethodGeneralRequest'
# ]
```

### build

Find the appropriate object from the `openapi_one_of` list and casts the data into it.

#### Example

```ruby
require 'conekta'

instance = Conekta::ChargeRequestPaymentMethod.new(
expires_at: 1677196303,
monthly_installments: null,
type: card,
token_id: tok_2897348234,
payment_source_id: src_2tLkkyfMPh6v7pFry,
contract_id: S781317595
)
Conekta::ChargeRequestPaymentMethod.build(data)
# => #<PaymentMethodCardRequest:0x00007fdd4aab02a0>

Conekta::ChargeRequestPaymentMethod.build(data_that_doesnt_match)
# => nil
```

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| **data** | **Mixed** | data to be matched against the list of oneOf items |

#### Return type

- `PaymentMethodCardRequest`
- `PaymentMethodGeneralRequest`
- `nil` (if no type matches)

12 changes: 6 additions & 6 deletions docs/ChargeResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
| **device_fingerprint** | **String** | | [optional] |
| **failure_code** | **String** | | [optional] |
| **failure_message** | **String** | | [optional] |
| **id** | **String** | | [optional] |
| **livemode** | **Boolean** | | [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** | | [optional] |
| **paid_at** | **Integer** | | [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] |
Expand All @@ -39,8 +39,8 @@ instance = Conekta::ChargeResponse.new(
failure_code: suspected_fraud,
failure_message: Este cargo ha sido declinado porque el comportamiento del comprador es sospechoso.,
id: 63efa757cf65380001aec040,
livemode: null,
object: null,
livemode: false,
object: charge,
order_id: ord_2tN73UdUSNrYRPD9r,
paid_at: 1676390742,
payment_method: null,
Expand Down
2 changes: 1 addition & 1 deletion docs/ChargesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ end

api_instance = Conekta::ChargesApi.new
id = '6307a60c41de27127515a575' # String | Identifier of the resource
charge_request = Conekta::ChargeRequest.new({payment_method: Conekta::ChargeRequestPaymentMethod.new({type: 'card'})}) # ChargeRequest | requested field for a charge
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.
Expand Down
12 changes: 6 additions & 6 deletions docs/ChargesDataResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
| **device_fingerprint** | **String** | | [optional] |
| **failure_code** | **String** | | [optional] |
| **failure_message** | **String** | | [optional] |
| **id** | **String** | | [optional] |
| **livemode** | **Boolean** | | [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** | | [optional] |
| **paid_at** | **Integer** | | [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] |
Expand All @@ -39,8 +39,8 @@ instance = Conekta::ChargesDataResponse.new(
failure_code: suspected_fraud,
failure_message: Este cargo ha sido declinado porque el comportamiento del comprador es sospechoso.,
id: 63efa757cf65380001aec040,
livemode: null,
object: null,
livemode: false,
object: charge,
order_id: ord_2tN73UdUSNrYRPD9r,
paid_at: 1676390742,
payment_method: null,
Expand Down
2 changes: 2 additions & 0 deletions docs/Checkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
| **expires_at** | **Integer** | 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) | |
| **monthly_installments_enabled** | **Boolean** | This flag allows you to specify if months without interest will be active. | [optional] |
| **monthly_installments_options** | **Array&lt;Integer&gt;** | This field allows you to specify the number of months without interest. | [optional] |
| **three_ds_mode** | **String** | Indicates the 3DS2 mode for the order, either smart or strict. | [optional] |
| **name** | **String** | Reason for charge | |
| **needs_shipping_contact** | **Boolean** | This flag allows you to fill in the shipping information at checkout. | [optional] |
| **on_demand_enabled** | **Boolean** | This flag allows you to specify if the link will be on demand. | [optional] |
Expand All @@ -26,6 +27,7 @@ instance = Conekta::Checkout.new(
expires_at: 1680397724,
monthly_installments_enabled: true,
monthly_installments_options: [3,6,12],
three_ds_mode: null,
name: Payment Link Name 1594138857,
needs_shipping_contact: false,
on_demand_enabled: true,
Expand Down
8 changes: 4 additions & 4 deletions docs/CreateCustomerPaymentMethodsRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ require 'conekta'
Conekta::CreateCustomerPaymentMethodsRequest.openapi_one_of
# =>
# [
# :'PaymentMethodCardRequest',
# :'PaymentMethodCashRequest',
# :'PaymentMethodSpeiRequest'
# :'PaymentMethodSpeiRequest',
# :'PaymentMethodTokenRequest'
# ]
```

Expand All @@ -30,7 +30,7 @@ Find the appropriate object from the `openapi_one_of` list and casts the data in
require 'conekta'

Conekta::CreateCustomerPaymentMethodsRequest.build(data)
# => #<PaymentMethodCardRequest:0x00007fdd4aab02a0>
# => #<PaymentMethodCashRequest:0x00007fdd4aab02a0>

Conekta::CreateCustomerPaymentMethodsRequest.build(data_that_doesnt_match)
# => nil
Expand All @@ -44,8 +44,8 @@ Conekta::CreateCustomerPaymentMethodsRequest.build(data_that_doesnt_match)

#### Return type

- `PaymentMethodCardRequest`
- `PaymentMethodCashRequest`
- `PaymentMethodSpeiRequest`
- `PaymentMethodTokenRequest`
- `nil` (if no type matches)

8 changes: 4 additions & 4 deletions docs/CustomerPaymentMethodsRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ require 'conekta'
Conekta::CustomerPaymentMethodsRequest.openapi_one_of
# =>
# [
# :'PaymentMethodCardRequest',
# :'PaymentMethodCashRequest',
# :'PaymentMethodSpeiRequest'
# :'PaymentMethodSpeiRequest',
# :'PaymentMethodTokenRequest'
# ]
```

Expand All @@ -30,7 +30,7 @@ Find the appropriate object from the `openapi_one_of` list and casts the data in
require 'conekta'

Conekta::CustomerPaymentMethodsRequest.build(data)
# => #<PaymentMethodCardRequest:0x00007fdd4aab02a0>
# => #<PaymentMethodCashRequest:0x00007fdd4aab02a0>

Conekta::CustomerPaymentMethodsRequest.build(data_that_doesnt_match)
# => nil
Expand All @@ -44,8 +44,8 @@ Conekta::CustomerPaymentMethodsRequest.build(data_that_doesnt_match)

#### Return type

- `PaymentMethodCardRequest`
- `PaymentMethodCashRequest`
- `PaymentMethodSpeiRequest`
- `PaymentMethodTokenRequest`
- `nil` (if no type matches)

4 changes: 2 additions & 2 deletions docs/OrderRefundRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **amount** | **Integer** | | |
| **amount** | **Integer** | Amount to be refunded in cents | |
| **expires_at** | **Integer** | | [optional] |
| **reason** | **String** | | |
| **reason** | **String** | Reason for the refund | |

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/OrderRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
| **needs_shipping_contact** | **Boolean** | Allows you to fill out the shipping information at checkout | [optional] |
| **pre_authorize** | **Boolean** | Indicates whether the order charges must be preauthorized | [optional][default to false] |
| **processing_mode** | **String** | Indicates the processing mode for the order, either ecommerce, recurrent or validation. | [optional] |
| **return_url** | **String** | Indicates the redirection callback upon completion of the 3DS2 flow. | [optional] |
| **return_url** | **String** | Indicates the redirection callback upon completion of the 3DS2 flow. Do not use this parameter if your order has a checkout parameter | [optional] |
| **shipping_contact** | [**CustomerShippingContacts**](CustomerShippingContacts.md) | | [optional] |
| **shipping_lines** | [**Array&lt;ShippingRequest&gt;**](ShippingRequest.md) | List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. | [optional] |
| **tax_lines** | [**Array&lt;OrderTaxRequest&gt;**](OrderTaxRequest.md) | List of [taxes](https://developers.conekta.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order. | [optional] |
Expand Down
4 changes: 3 additions & 1 deletion docs/PaymentMethodBankTransfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
| **receiving_account_tax_id** | **String** | | [optional] |
| **reference_number** | **String** | | [optional] |
| **tracking_code** | **String** | | [optional] |
| **customer_ip_address** | **String** | | [optional] |

## Example

Expand All @@ -46,7 +47,8 @@ instance = Conekta::PaymentMethodBankTransfer.new(
receiving_account_bank: STP,
receiving_account_tax_id: null,
reference_number: null,
tracking_code: null
tracking_code: null,
customer_ip_address: 0.0.0.0
)
```

22 changes: 12 additions & 10 deletions docs/PaymentMethodCard.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
| ---- | ---- | ----------- | ----- |
| **type** | **String** | | [optional] |
| **object** | **String** | | |
| **account_type** | **String** | | [optional] |
| **account_type** | **String** | Account type of the card | [optional] |
| **auth_code** | **String** | | [optional] |
| **brand** | **String** | | [optional] |
| **brand** | **String** | Brand of the card | [optional] |
| **contract_id** | **String** | Id sent for recurrent charges. | [optional] |
| **country** | **String** | | [optional] |
| **exp_month** | **String** | | [optional] |
| **exp_year** | **String** | | [optional] |
| **country** | **String** | Country of the card | [optional] |
| **exp_month** | **String** | Expiration month of the card | [optional] |
| **exp_year** | **String** | Expiration year of the card | [optional] |
| **fraud_indicators** | **Array&lt;Object&gt;** | | [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] |
| **customer_ip_address** | **String** | Optional field used to capture the customer&#39;s IP address for fraud prevention and security monitoring purposes | [optional] |

## Example

Expand All @@ -32,11 +33,12 @@ instance = Conekta::PaymentMethodCard.new(
contract_id: S781317595,
country: MX,
exp_month: 02,
exp_year: 30,
exp_year: 2026,
fraud_indicators: null,
issuer: BANAMEX,
last4: 4242,
name: Fulanito Perez
name: Fulanito Perez,
customer_ip_address: 0.0.0.0
)
```

Loading

0 comments on commit 453f765

Please sign in to comment.