From 61431c745667351d32bb525bcad647a4efcbe4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Cedr=C3=B3n?= <josenicolascedron@gmail.com> Date: Tue, 17 Dec 2024 19:15:22 -0300 Subject: [PATCH] AI-126: Regenerate SDK --- .openapi-generator/FILES | 4 + README.md | 4 + api/openapi.yaml | 290 +++++++- docs/ChargesApi.md | 81 +++ docs/ChargesOrderResponse.md | 16 + docs/ChargesOrderResponseAllOfData.md | 30 + docs/CheckoutRequest.md | 1 + docs/Customer.md | 2 + docs/CustomerResponse.md | 2 + docs/OrderResponseCheckout.md | 1 + docs/PaymentMethodCash.md | 2 + docs/PayoutOrdersApi.md | 76 +++ docs/UpdateCustomer.md | 2 + src/main/java/com/conekta/ChargesApi.java | 73 ++ .../java/com/conekta/PayoutOrdersApi.java | 60 ++ .../conekta/model/ChargesOrderResponse.java | 183 +++++ .../model/ChargesOrderResponseAllOfData.java | 640 ++++++++++++++++++ .../com/conekta/model/CheckoutRequest.java | 33 +- src/main/java/com/conekta/model/Customer.java | 64 +- .../com/conekta/model/CustomerResponse.java | 64 +- .../conekta/model/OrderResponseCheckout.java | 33 +- .../com/conekta/model/PaymentMethodCash.java | 64 +- .../com/conekta/model/UpdateCustomer.java | 64 +- 23 files changed, 1782 insertions(+), 7 deletions(-) create mode 100644 docs/ChargesOrderResponse.md create mode 100644 docs/ChargesOrderResponseAllOfData.md create mode 100644 src/main/java/com/conekta/model/ChargesOrderResponse.java create mode 100644 src/main/java/com/conekta/model/ChargesOrderResponseAllOfData.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index e9e98db..76293fb 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -27,6 +27,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 @@ -263,6 +265,8 @@ src/main/java/com/conekta/model/ChargeResponseRefunds.java src/main/java/com/conekta/model/ChargeResponseRefundsData.java src/main/java/com/conekta/model/ChargeUpdateRequest.java src/main/java/com/conekta/model/ChargesDataResponse.java +src/main/java/com/conekta/model/ChargesOrderResponse.java +src/main/java/com/conekta/model/ChargesOrderResponseAllOfData.java src/main/java/com/conekta/model/Checkout.java src/main/java/com/conekta/model/CheckoutOrderTemplate.java src/main/java/com/conekta/model/CheckoutOrderTemplateCustomerInfo.java diff --git a/README.md b/README.md index 6ce9897..67180d0 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,7 @@ Class | Method | HTTP request | Description *BalancesApi* | [**getBalance**](docs/BalancesApi.md#getBalance) | **GET** /balance | Get a company's balance *ChargesApi* | [**getCharges**](docs/ChargesApi.md#getCharges) | **GET** /charges | Get A List of Charges *ChargesApi* | [**ordersCreateCharge**](docs/ChargesApi.md#ordersCreateCharge) | **POST** /orders/{id}/charges | Create charge +*ChargesApi* | [**ordersCreateCharges**](docs/ChargesApi.md#ordersCreateCharges) | **POST** /orders/{id}/add_charges | Create charges *ChargesApi* | [**updateCharge**](docs/ChargesApi.md#updateCharge) | **PUT** /charges/{id} | Update a charge *CompaniesApi* | [**getCompanies**](docs/CompaniesApi.md#getCompanies) | **GET** /companies | Get List of Companies *CompaniesApi* | [**getCompany**](docs/CompaniesApi.md#getCompany) | **GET** /companies/{id} | Get Company @@ -195,6 +196,7 @@ Class | Method | HTTP request | Description *PaymentMethodsApi* | [**deleteCustomerPaymentMethods**](docs/PaymentMethodsApi.md#deleteCustomerPaymentMethods) | **DELETE** /customers/{id}/payment_sources/{payment_method_id} | Delete Payment Method *PaymentMethodsApi* | [**getCustomerPaymentMethods**](docs/PaymentMethodsApi.md#getCustomerPaymentMethods) | **GET** /customers/{id}/payment_sources | Get Payment Methods *PaymentMethodsApi* | [**updateCustomerPaymentMethods**](docs/PaymentMethodsApi.md#updateCustomerPaymentMethods) | **PUT** /customers/{id}/payment_sources/{payment_method_id} | Update Payment Method +*PayoutOrdersApi* | [**cancelPayoutOrderById**](docs/PayoutOrdersApi.md#cancelPayoutOrderById) | **PUT** /payout_orders/{id}/cancel | Cancel Payout Order *PayoutOrdersApi* | [**createPayoutOrder**](docs/PayoutOrdersApi.md#createPayoutOrder) | **POST** /payout_orders | Create payout order *PayoutOrdersApi* | [**getPayoutOrderById**](docs/PayoutOrdersApi.md#getPayoutOrderById) | **GET** /payout_orders/{id} | Get Payout Order *PayoutOrdersApi* | [**getPayoutOrders**](docs/PayoutOrdersApi.md#getPayoutOrders) | **GET** /payout_orders | Get a list of Payout Orders @@ -261,6 +263,8 @@ Class | Method | HTTP request | Description - [ChargeResponseRefundsData](docs/ChargeResponseRefundsData.md) - [ChargeUpdateRequest](docs/ChargeUpdateRequest.md) - [ChargesDataResponse](docs/ChargesDataResponse.md) + - [ChargesOrderResponse](docs/ChargesOrderResponse.md) + - [ChargesOrderResponseAllOfData](docs/ChargesOrderResponseAllOfData.md) - [Checkout](docs/Checkout.md) - [CheckoutOrderTemplate](docs/CheckoutOrderTemplate.md) - [CheckoutOrderTemplateCustomerInfo](docs/CheckoutOrderTemplateCustomerInfo.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index a59e8ba..9294355 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -1622,6 +1622,130 @@ paths: x-content-type: application/json x-accepts: - application/vnd.conekta-v2.1.0+json + /orders/{id}/add_charges: + post: + description: Create charges for an existing orden + operationId: ordersCreateCharges + parameters: + - description: Identifier of the resource + example: 6307a60c41de27127515a575 + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: Use for knowing which language to use + examples: + es: + summary: for spanish request/response + value: es + en: + summary: for english request/response + value: en + explode: false + in: header + name: Accept-Language + required: false + schema: + default: es + enum: + - es + - en + type: string + style: simple + - description: "In the case of a holding company, the company id of the child\ + \ company to which will process the request." + example: 6441b6376b60c3a638da80af + explode: false + in: header + name: X-Child-Company-Id + required: false + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/charge_create' + responses: + "200": + content: + application/vnd.conekta-v2.1.0+json: + schema: + $ref: '#/components/schemas/charges_order_response' + description: successful + "401": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - message: Please include your access key in your request. + param: null + code: conekta.errors.authentication.missing_key + log_id: 507f1f77bcf86cd799439011 + object: error + type: authentication_error + schema: + $ref: '#/components/schemas/error' + description: authentication error + "404": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - message: The resource was not found. + param: null + code: conekta.errors.resource_not_found.entity + debug_message: The object Webhook "641b1d5662d7e00001eaa46b" could + not be found. + log_id: 641b6c253cd9a50001514fae + object: error + type: resource_not_found_error + schema: + $ref: '#/components/schemas/error' + description: not found entity + "428": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - debug_message: The order cannot be modified because it has already + a charge which is pending payment. + message: The order cannot be modified because it has already a charge + which is pending payment. + param: null + code: conekta.errors.precondition_required.combo.order.cannot_be_updated_because_has_charge + log_id: 641b6e233cd9a50001515039 + object: error + type: precondition_required_error + schema: + $ref: '#/components/schemas/error' + description: Precondition Required + "500": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - debug_message: There was a runtime error and Conekta engineers have + been notified. + message: There was a runtime error and Conekta engineers have been + notified. + param: null + code: conekta.errors.api.system.general_failure + object: error + type: api_error + log_id: 641b6f2b3cd9a50001515098 + schema: + $ref: '#/components/schemas/error' + description: internal server error + security: + - bearerAuth: [] + summary: Create charges + tags: + - Charges + x-content-type: application/json + x-accepts: + - application/vnd.conekta-v2.1.0+json /companies: get: description: Consume the list of child companies. This is used for holding @@ -5781,6 +5905,101 @@ paths: - Payout Orders x-accepts: - application/vnd.conekta-v2.1.0+json + /payout_orders/{id}/cancel: + put: + description: Cancel a payout Order resource that corresponds to a payout order + ID. + operationId: cancelPayoutOrderById + parameters: + - description: Identifier of the resource + example: 6307a60c41de27127515a575 + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: Use for knowing which language to use + examples: + es: + summary: for spanish request/response + value: es + en: + summary: for english request/response + value: en + explode: false + in: header + name: Accept-Language + required: false + schema: + default: es + enum: + - es + - en + type: string + style: simple + responses: + "200": + content: + application/vnd.conekta-v2.1.0+json: + schema: + $ref: '#/components/schemas/payout_order_response' + description: successful operation + "401": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - message: Please include your access key in your request. + param: null + code: conekta.errors.authentication.missing_key + log_id: 507f1f77bcf86cd799439011 + object: error + type: authentication_error + schema: + $ref: '#/components/schemas/error' + description: authentication error + "404": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - message: The resource was not found. + param: null + code: conekta.errors.resource_not_found.entity + debug_message: The object Webhook "641b1d5662d7e00001eaa46b" could + not be found. + log_id: 641b6c253cd9a50001514fae + object: error + type: resource_not_found_error + schema: + $ref: '#/components/schemas/error' + description: not found entity + "500": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - debug_message: There was a runtime error and Conekta engineers have + been notified. + message: There was a runtime error and Conekta engineers have been + notified. + param: null + code: conekta.errors.api.system.general_failure + object: error + type: api_error + log_id: 641b6f2b3cd9a50001515098 + schema: + $ref: '#/components/schemas/error' + description: internal server error + security: + - bearerAuth: [] + summary: Cancel Payout Order + tags: + - Payout Orders + x-accepts: + - application/vnd.conekta-v2.1.0+json /checkouts: get: description: Returns a list of links generated by the merchant @@ -13647,6 +13866,16 @@ components: type: string title: charges_data_response type: object + charges_order_response: + allOf: + - $ref: '#/components/schemas/pagination' + - properties: + data: + items: + $ref: '#/components/schemas/charges_order_response_allOf_data' + type: array + type: object + description: The charges associated with the order company_response: description: Company model properties: @@ -13700,6 +13929,11 @@ components: description: Custom reference example: custom_reference type: string + date_of_birth: + description: It is a parameter that allows to identify the date of birth + of the client. + example: 24/07/1992 + type: string default_fiscal_entity_id: example: fis_ent_2tKqqAfqPi21oCmEJ nullable: true @@ -13730,6 +13964,11 @@ components: description: Customer's name example: Felipe type: string + national_id: + description: It is a parameter that allows to identify the national identification + number of the client. + example: HEGG560427MVZRRL04 + type: string metadata: additionalProperties: true maxProperties: 100 @@ -14958,6 +15197,11 @@ components: custom_reference: description: It is an undefined value. type: string + date_of_birth: + description: It is a parameter that allows to identify the date of birth + of the client. + example: 24/07/1992 + type: string email: description: "An email address is a series of customizable characters followed\ \ by a universal Internet symbol, the at symbol (@), the name of a host\ @@ -14987,6 +15231,11 @@ components: description: Client's name example: miguel type: string + national_id: + description: It is a parameter that allows to identify the national identification + number of the client. + example: HEGG560427MVZRRL04 + type: string payment_sources: description: Contains details of the payment methods that the customer has active or has used in Conekta @@ -15021,6 +15270,11 @@ components: properties: antifraud_info: $ref: '#/components/schemas/update_customer_antifraud_info' + date_of_birth: + description: It is a parameter that allows to identify the date of birth + of the client. + example: 24/07/1992 + type: string default_payment_source_id: description: "It is a parameter that allows to identify in the response,\ \ the Conekta ID of a payment method (payment_id)" @@ -15067,6 +15321,11 @@ components: additionalProperties: true maxProperties: 100 type: object + national_id: + description: It is a parameter that allows to identify the national identification + number of the client. + example: HEGG560427MVZRRL04 + type: string payment_sources: description: Contains details of the payment methods that the customer has active or has used in Conekta @@ -15871,6 +16130,10 @@ components: - $ref: '#/components/schemas/payment_method' - description: use for cash responses properties: + agreement: + description: Agreement ID + example: agreement_2tN73UdUSNrYRPD9r + type: string auth_code: example: 542563 nullable: true @@ -15889,6 +16152,11 @@ components: example: 0 format: int64 type: integer + product_type: + description: "Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in,\ + \ etc." + example: bbva_cash_in + type: string service_name: example: OxxoPay type: string @@ -16282,6 +16550,12 @@ components: format: int8 type: integer type: array + max_failed_retries: + description: Number of retries allowed before the checkout is marked as + failed + example: 3 + format: int8 + type: integer name: description: Reason for payment type: string @@ -16659,7 +16933,6 @@ components: expires_at: example: 1553273553 format: int64 - nullable: true type: integer reason: description: Reason for the refund @@ -16971,6 +17244,9 @@ components: - $ref: '#/components/schemas/payment_method_card' - $ref: '#/components/schemas/payment_method_bank_transfer' title: charge_order_response_payment_method + charges_order_response_allOf_data: + allOf: + - $ref: '#/components/schemas/charge_response' customer_antifraud_info_response: nullable: true properties: @@ -17270,6 +17546,13 @@ components: livemode: example: false type: boolean + max_failed_retries: + description: Number of retries allowed before the checkout is marked as + failed + example: 3 + format: int8 + nullable: true + type: integer metadata: additionalProperties: true maxProperties: 100 @@ -17977,6 +18260,7 @@ components: example: "123" maxLength: 4 type: string + x-encripted: true device_fingerprint: description: It is a value that allows identifying the device fingerprint. example: zptcxk4p6w1ijwz85snf1l3bqe5g09ie @@ -17987,20 +18271,24 @@ components: example: "12" maxLength: 2 type: string + x-encripted: true exp_year: description: It is a value that allows identifying the expiration year of the card. example: "26" maxLength: 2 type: string + x-encripted: true name: description: It is a value that allows identifying the name of the cardholder. example: Miguel type: string + x-encripted: true number: description: It is a value that allows identifying the number of the card. example: "4242424242424242" type: string + x-encripted: true required: - cvc - exp_month diff --git a/docs/ChargesApi.md b/docs/ChargesApi.md index 1a67419..9d2376d 100644 --- a/docs/ChargesApi.md +++ b/docs/ChargesApi.md @@ -6,6 +6,7 @@ All URIs are relative to *https://api.conekta.io* |------------- | ------------- | -------------| | [**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 | @@ -170,6 +171,86 @@ public class Example { | **500** | internal server error | - | +## ordersCreateCharges + +> ChargesOrderResponse ordersCreateCharges(id, chargeRequest, acceptLanguage, xChildCompanyId) + +Create charges + +Create charges for an existing orden + +### Example + +```java +// Import classes: +import com.conekta.ApiClient; +import com.conekta.ApiException; +import com.conekta.Configuration; +import com.conekta.auth.*; +import com.conekta.model.*; +import com.conekta.ChargesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.conekta.io"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + ChargesApi apiInstance = new ChargesApi(defaultClient); + String id = "6307a60c41de27127515a575"; // String | Identifier of the resource + ChargeRequest chargeRequest = new ChargeRequest(); // ChargeRequest | requested field for a charge + String acceptLanguage = "es"; // String | Use for knowing which language to use + 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 { + ChargesOrderResponse result = apiInstance.ordersCreateCharges(id, chargeRequest, acceptLanguage, xChildCompanyId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ChargesApi#ordersCreateCharges"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### 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] [enum: es, en] | +| **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 + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful | - | +| **401** | authentication error | - | +| **404** | not found entity | - | +| **428** | Precondition Required | - | +| **500** | internal server error | - | + + ## updateCharge > ChargeResponse updateCharge(id, chargeUpdateRequest, acceptLanguage, xChildCompanyId) diff --git a/docs/ChargesOrderResponse.md b/docs/ChargesOrderResponse.md new file mode 100644 index 0000000..4c532f9 --- /dev/null +++ b/docs/ChargesOrderResponse.md @@ -0,0 +1,16 @@ + + +# ChargesOrderResponse + +The charges associated with the order + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hasMore** | **Boolean** | Indicates if there are more pages to be requested | | +|**_object** | **String** | Object type, in this case is list | | +|**data** | [**List<ChargesOrderResponseAllOfData>**](ChargesOrderResponseAllOfData.md) | | [optional] | + + + diff --git a/docs/ChargesOrderResponseAllOfData.md b/docs/ChargesOrderResponseAllOfData.md new file mode 100644 index 0000000..86ccc62 --- /dev/null +++ b/docs/ChargesOrderResponseAllOfData.md @@ -0,0 +1,30 @@ + + +# ChargesOrderResponseAllOfData + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | **Integer** | | [optional] | +|**channel** | [**ChargeResponseChannel**](ChargeResponseChannel.md) | | [optional] | +|**createdAt** | **Long** | | [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** | **Boolean** | Whether the charge was made in live mode or not | [optional] | +|**_object** | **String** | | [optional] | +|**orderId** | **String** | Order ID | [optional] | +|**paidAt** | **Long** | Payment date | [optional] | +|**paymentMethod** | [**ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional] | +|**referenceId** | **String** | Reference ID of the charge | [optional] | +|**refunds** | [**ChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional] | +|**status** | **String** | | [optional] | + + + diff --git a/docs/CheckoutRequest.md b/docs/CheckoutRequest.md index eb6f74c..346473d 100644 --- a/docs/CheckoutRequest.md +++ b/docs/CheckoutRequest.md @@ -13,6 +13,7 @@ |**failureUrl** | **String** | Redirection url back to the site in case of failed payment, applies only to HostedPayment. | [optional] | |**monthlyInstallmentsEnabled** | **Boolean** | | [optional] | |**monthlyInstallmentsOptions** | **List<Integer>** | | [optional] | +|**maxFailedRetries** | **Integer** | Number of retries allowed before the checkout is marked as failed | [optional] | |**name** | **String** | Reason for payment | [optional] | |**onDemandEnabled** | **Boolean** | | [optional] | |**redirectionTime** | **Integer** | number of seconds to wait before redirecting to the success_url | [optional] | diff --git a/docs/Customer.md b/docs/Customer.md index e10bfc8..016ad11 100644 --- a/docs/Customer.md +++ b/docs/Customer.md @@ -11,12 +11,14 @@ a customer |**antifraudInfo** | [**CustomerAntifraudInfo**](CustomerAntifraudInfo.md) | | [optional] | |**corporate** | **Boolean** | It is a value that allows identifying if the email is corporate or not. | [optional] | |**customReference** | **String** | It is an undefined value. | [optional] | +|**dateOfBirth** | **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). | | |**defaultPaymentSourceId** | **String** | It is a parameter that allows to identify in the response, the Conekta ID of a payment method (payment_id) | [optional] | |**defaultShippingContactId** | **String** | It is a parameter that allows to identify in the response, the Conekta ID of the shipping address (shipping_contact) | [optional] | |**fiscalEntities** | [**List<CustomerFiscalEntitiesRequest>**](CustomerFiscalEntitiesRequest.md) | | [optional] | |**metadata** | **Map<String, Object>** | | [optional] | |**name** | **String** | Client's name | | +|**nationalId** | **String** | It is a parameter that allows to identify the national identification number of the client. | [optional] | |**paymentSources** | [**List<CustomerPaymentMethodsRequest>**](CustomerPaymentMethodsRequest.md) | Contains details of the payment methods that the customer has active or has used in Conekta | [optional] | |**phone** | **String** | Is the customer's phone number | | |**planId** | **String** | Contains the ID of a plan, which could together with name, email and phone create a client directly to a subscription | [optional] | diff --git a/docs/CustomerResponse.md b/docs/CustomerResponse.md index 6ac83c2..cff1a1d 100644 --- a/docs/CustomerResponse.md +++ b/docs/CustomerResponse.md @@ -12,6 +12,7 @@ customer response |**corporate** | **Boolean** | true if the customer is a company | [optional] | |**createdAt** | **Long** | Creation date of the object | | |**customReference** | **String** | Custom reference | [optional] | +|**dateOfBirth** | **String** | It is a parameter that allows to identify the date of birth of the client. | [optional] | |**defaultFiscalEntityId** | **String** | | [optional] | |**defaultShippingContactId** | **String** | | [optional] | |**defaultPaymentSourceId** | **String** | | [optional] | @@ -20,6 +21,7 @@ customer response |**id** | **String** | Customer'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's name | | +|**nationalId** | **String** | It is a parameter that allows to identify the national identification number of the client. | [optional] | |**metadata** | **Map<String, Object>** | | [optional] | |**_object** | **String** | | | |**paymentSources** | [**CustomerPaymentMethodsResponse**](CustomerPaymentMethodsResponse.md) | | [optional] | diff --git a/docs/OrderResponseCheckout.md b/docs/OrderResponseCheckout.md index 9731409..c003f0b 100644 --- a/docs/OrderResponseCheckout.md +++ b/docs/OrderResponseCheckout.md @@ -17,6 +17,7 @@ |**id** | **String** | | [optional] | |**isRedirectOnFailure** | **Boolean** | | [optional] | |**livemode** | **Boolean** | | [optional] | +|**maxFailedRetries** | **Integer** | Number of retries allowed before the checkout is marked as failed | [optional] | |**metadata** | **Map<String, Object>** | | [optional] | |**monthlyInstallmentsEnabled** | **Boolean** | | [optional] | |**monthlyInstallmentsOptions** | **List<Integer>** | | [optional] | diff --git a/docs/PaymentMethodCash.md b/docs/PaymentMethodCash.md index 863689d..79b5819 100644 --- a/docs/PaymentMethodCash.md +++ b/docs/PaymentMethodCash.md @@ -9,11 +9,13 @@ |------------ | ------------- | ------------- | -------------| |**type** | **String** | | [optional] | |**_object** | **String** | | | +|**agreement** | **String** | Agreement ID | [optional] | |**authCode** | **Integer** | | [optional] | |**cashierId** | **String** | | [optional] | |**reference** | **String** | | [optional] | |**barcodeUrl** | **String** | | [optional] | |**expiresAt** | **Long** | | [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] | diff --git a/docs/PayoutOrdersApi.md b/docs/PayoutOrdersApi.md index f4cece8..c5bb8fa 100644 --- a/docs/PayoutOrdersApi.md +++ b/docs/PayoutOrdersApi.md @@ -4,12 +4,88 @@ All URIs are relative to *https://api.conekta.io* | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**cancelPayoutOrderById**](PayoutOrdersApi.md#cancelPayoutOrderById) | **PUT** /payout_orders/{id}/cancel | Cancel Payout Order | | [**createPayoutOrder**](PayoutOrdersApi.md#createPayoutOrder) | **POST** /payout_orders | Create payout order | | [**getPayoutOrderById**](PayoutOrdersApi.md#getPayoutOrderById) | **GET** /payout_orders/{id} | Get Payout Order | | [**getPayoutOrders**](PayoutOrdersApi.md#getPayoutOrders) | **GET** /payout_orders | Get a list of Payout Orders | +## cancelPayoutOrderById + +> PayoutOrderResponse cancelPayoutOrderById(id, acceptLanguage) + +Cancel Payout Order + +Cancel a payout Order resource that corresponds to a payout order ID. + +### Example + +```java +// Import classes: +import com.conekta.ApiClient; +import com.conekta.ApiException; +import com.conekta.Configuration; +import com.conekta.auth.*; +import com.conekta.model.*; +import com.conekta.PayoutOrdersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.conekta.io"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + PayoutOrdersApi apiInstance = new PayoutOrdersApi(defaultClient); + String id = "6307a60c41de27127515a575"; // String | Identifier of the resource + String acceptLanguage = "es"; // String | Use for knowing which language to use + try { + PayoutOrderResponse result = apiInstance.cancelPayoutOrderById(id, acceptLanguage); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PayoutOrdersApi#cancelPayoutOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| Identifier of the resource | | +| **acceptLanguage** | **String**| Use for knowing which language to use | [optional] [default to es] [enum: es, en] | + +### Return type + +[**PayoutOrderResponse**](PayoutOrderResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.conekta-v2.1.0+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **401** | authentication error | - | +| **404** | not found entity | - | +| **500** | internal server error | - | + + ## createPayoutOrder > PayoutOrderResponse createPayoutOrder(payoutOrder, acceptLanguage) diff --git a/docs/UpdateCustomer.md b/docs/UpdateCustomer.md index d402f34..f941564 100644 --- a/docs/UpdateCustomer.md +++ b/docs/UpdateCustomer.md @@ -9,6 +9,7 @@ update customer | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**antifraudInfo** | [**UpdateCustomerAntifraudInfo**](UpdateCustomerAntifraudInfo.md) | | [optional] | +|**dateOfBirth** | **String** | It is a parameter that allows to identify the date of birth of the client. | [optional] | |**defaultPaymentSourceId** | **String** | It is a parameter that allows to identify in the response, the Conekta ID of a payment method (payment_id) | [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). | [optional] | |**name** | **String** | Client's name | [optional] | @@ -19,6 +20,7 @@ update customer |**customReference** | **String** | It is an undefined value. | [optional] | |**fiscalEntities** | [**List<CustomerFiscalEntitiesRequest>**](CustomerFiscalEntitiesRequest.md) | | [optional] | |**metadata** | **Map<String, Object>** | | [optional] | +|**nationalId** | **String** | It is a parameter that allows to identify the national identification number of the client. | [optional] | |**paymentSources** | [**List<CustomerPaymentMethodsRequest>**](CustomerPaymentMethodsRequest.md) | Contains details of the payment methods that the customer has active or has used in Conekta | [optional] | |**shippingContacts** | [**List<CustomerShippingContacts>**](CustomerShippingContacts.md) | Contains the detail of the shipping addresses that the client has active or has used in Conekta | [optional] | |**subscription** | [**SubscriptionRequest**](SubscriptionRequest.md) | | [optional] | diff --git a/src/main/java/com/conekta/ChargesApi.java b/src/main/java/com/conekta/ChargesApi.java index cce385e..d90f0f6 100644 --- a/src/main/java/com/conekta/ChargesApi.java +++ b/src/main/java/com/conekta/ChargesApi.java @@ -12,6 +12,7 @@ import com.conekta.model.ChargeRequest; import com.conekta.model.ChargeResponse; import com.conekta.model.ChargeUpdateRequest; +import com.conekta.model.ChargesOrderResponse; import com.conekta.model.Error; import com.conekta.model.GetChargesResponse; @@ -191,6 +192,78 @@ public ApiResponse<ChargeOrderResponse> ordersCreateChargeWithHttpInfo(String id localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } + /** + * Create charges + * Create charges for an existing orden + * @param id Identifier of the resource (required) + * @param chargeRequest requested field for a charge (required) + * @param acceptLanguage Use for knowing which language to use (optional, default to es) + * @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional) + * @return ChargesOrderResponse + * @throws ApiException if fails to make API call + * @http.response.details + <table summary="Response Details" border="1"> + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> + <tr><td> 200 </td><td> successful </td><td> - </td></tr> + <tr><td> 401 </td><td> authentication error </td><td> - </td></tr> + <tr><td> 404 </td><td> not found entity </td><td> - </td></tr> + <tr><td> 428 </td><td> Precondition Required </td><td> - </td></tr> + <tr><td> 500 </td><td> internal server error </td><td> - </td></tr> + </table> + */ + public ChargesOrderResponse ordersCreateCharges(String id, ChargeRequest chargeRequest, String acceptLanguage, String xChildCompanyId) throws ApiException { + return ordersCreateChargesWithHttpInfo(id, chargeRequest, acceptLanguage, xChildCompanyId).getData(); + } + + /** + * Create charges + * Create charges for an existing orden + * @param id Identifier of the resource (required) + * @param chargeRequest requested field for a charge (required) + * @param acceptLanguage Use for knowing which language to use (optional, default to es) + * @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional) + * @return ApiResponse<ChargesOrderResponse> + * @throws ApiException if fails to make API call + * @http.response.details + <table summary="Response Details" border="1"> + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> + <tr><td> 200 </td><td> successful </td><td> - </td></tr> + <tr><td> 401 </td><td> authentication error </td><td> - </td></tr> + <tr><td> 404 </td><td> not found entity </td><td> - </td></tr> + <tr><td> 428 </td><td> Precondition Required </td><td> - </td></tr> + <tr><td> 500 </td><td> internal server error </td><td> - </td></tr> + </table> + */ + public ApiResponse<ChargesOrderResponse> ordersCreateChargesWithHttpInfo(String id, ChargeRequest chargeRequest, String acceptLanguage, String xChildCompanyId) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling ordersCreateCharges"); + } + if (chargeRequest == null) { + throw new ApiException(400, "Missing the required parameter 'chargeRequest' when calling ordersCreateCharges"); + } + + // Path parameters + String localVarPath = "/orders/{id}/add_charges" + .replaceAll("\\{id}", apiClient.escapeString(id)); + + // Header parameters + Map<String, String> localVarHeaderParams = new LinkedHashMap<>(); + if (acceptLanguage != null) { + localVarHeaderParams.put("Accept-Language", apiClient.parameterToString(acceptLanguage)); + } + if (xChildCompanyId != null) { + localVarHeaderParams.put("X-Child-Company-Id", apiClient.parameterToString(xChildCompanyId)); + } + + String localVarAccept = apiClient.selectHeaderAccept("application/vnd.conekta-v2.1.0+json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"bearerAuth"}; + GenericType<ChargesOrderResponse> localVarReturnType = new GenericType<ChargesOrderResponse>() {}; + return apiClient.invokeAPI("ChargesApi.ordersCreateCharges", localVarPath, "POST", new ArrayList<>(), chargeRequest, + localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } /** * Update a charge * diff --git a/src/main/java/com/conekta/PayoutOrdersApi.java b/src/main/java/com/conekta/PayoutOrdersApi.java index a37a004..4f5fbb9 100644 --- a/src/main/java/com/conekta/PayoutOrdersApi.java +++ b/src/main/java/com/conekta/PayoutOrdersApi.java @@ -49,6 +49,66 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Cancel Payout Order + * Cancel a payout Order resource that corresponds to a payout order ID. + * @param id Identifier of the resource (required) + * @param acceptLanguage Use for knowing which language to use (optional, default to es) + * @return PayoutOrderResponse + * @throws ApiException if fails to make API call + * @http.response.details + <table summary="Response Details" border="1"> + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> + <tr><td> 200 </td><td> successful operation </td><td> - </td></tr> + <tr><td> 401 </td><td> authentication error </td><td> - </td></tr> + <tr><td> 404 </td><td> not found entity </td><td> - </td></tr> + <tr><td> 500 </td><td> internal server error </td><td> - </td></tr> + </table> + */ + public PayoutOrderResponse cancelPayoutOrderById(String id, String acceptLanguage) throws ApiException { + return cancelPayoutOrderByIdWithHttpInfo(id, acceptLanguage).getData(); + } + + /** + * Cancel Payout Order + * Cancel a payout Order resource that corresponds to a payout order ID. + * @param id Identifier of the resource (required) + * @param acceptLanguage Use for knowing which language to use (optional, default to es) + * @return ApiResponse<PayoutOrderResponse> + * @throws ApiException if fails to make API call + * @http.response.details + <table summary="Response Details" border="1"> + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> + <tr><td> 200 </td><td> successful operation </td><td> - </td></tr> + <tr><td> 401 </td><td> authentication error </td><td> - </td></tr> + <tr><td> 404 </td><td> not found entity </td><td> - </td></tr> + <tr><td> 500 </td><td> internal server error </td><td> - </td></tr> + </table> + */ + public ApiResponse<PayoutOrderResponse> cancelPayoutOrderByIdWithHttpInfo(String id, String acceptLanguage) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling cancelPayoutOrderById"); + } + + // Path parameters + String localVarPath = "/payout_orders/{id}/cancel" + .replaceAll("\\{id}", apiClient.escapeString(id)); + + // Header parameters + Map<String, String> localVarHeaderParams = new LinkedHashMap<>(); + if (acceptLanguage != null) { + localVarHeaderParams.put("Accept-Language", apiClient.parameterToString(acceptLanguage)); + } + + String localVarAccept = apiClient.selectHeaderAccept("application/vnd.conekta-v2.1.0+json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"bearerAuth"}; + GenericType<PayoutOrderResponse> localVarReturnType = new GenericType<PayoutOrderResponse>() {}; + return apiClient.invokeAPI("PayoutOrdersApi.cancelPayoutOrderById", localVarPath, "PUT", new ArrayList<>(), null, + localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } /** * Create payout order * Create a new payout order. diff --git a/src/main/java/com/conekta/model/ChargesOrderResponse.java b/src/main/java/com/conekta/model/ChargesOrderResponse.java new file mode 100644 index 0000000..babbadb --- /dev/null +++ b/src/main/java/com/conekta/model/ChargesOrderResponse.java @@ -0,0 +1,183 @@ +/* + * Conekta API + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.conekta.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.conekta.model.ChargesOrderResponseAllOfData; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.conekta.JSON; + + +/** + * The charges associated with the order + */ +@JsonPropertyOrder({ + ChargesOrderResponse.JSON_PROPERTY_HAS_MORE, + ChargesOrderResponse.JSON_PROPERTY_OBJECT, + ChargesOrderResponse.JSON_PROPERTY_DATA +}) +@JsonTypeName("charges_order_response") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0") +public class ChargesOrderResponse { + public static final String JSON_PROPERTY_HAS_MORE = "has_more"; + private Boolean hasMore; + + public static final String JSON_PROPERTY_OBJECT = "object"; + private String _object; + + public static final String JSON_PROPERTY_DATA = "data"; + private List<ChargesOrderResponseAllOfData> data = new ArrayList<>(); + + public ChargesOrderResponse() { + } + + public ChargesOrderResponse hasMore(Boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * Indicates if there are more pages to be requested + * @return hasMore + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HAS_MORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getHasMore() { + return hasMore; + } + + + @JsonProperty(JSON_PROPERTY_HAS_MORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHasMore(Boolean hasMore) { + this.hasMore = hasMore; + } + + + public ChargesOrderResponse _object(String _object) { + this._object = _object; + return this; + } + + /** + * Object type, in this case is list + * @return _object + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OBJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getObject() { + return _object; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setObject(String _object) { + this._object = _object; + } + + + public ChargesOrderResponse data(List<ChargesOrderResponseAllOfData> data) { + this.data = data; + return this; + } + + public ChargesOrderResponse addDataItem(ChargesOrderResponseAllOfData dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List<ChargesOrderResponseAllOfData> getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List<ChargesOrderResponseAllOfData> data) { + this.data = data; + } + + + /** + * Return true if this charges_order_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChargesOrderResponse chargesOrderResponse = (ChargesOrderResponse) o; + return Objects.equals(this.hasMore, chargesOrderResponse.hasMore) && + Objects.equals(this._object, chargesOrderResponse._object) && + Objects.equals(this.data, chargesOrderResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(hasMore, _object, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChargesOrderResponse {\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" _object: ").append(toIndentedString(_object)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/conekta/model/ChargesOrderResponseAllOfData.java b/src/main/java/com/conekta/model/ChargesOrderResponseAllOfData.java new file mode 100644 index 0000000..ea2944d --- /dev/null +++ b/src/main/java/com/conekta/model/ChargesOrderResponseAllOfData.java @@ -0,0 +1,640 @@ +/* + * Conekta API + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.conekta.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.conekta.model.ChargeResponseChannel; +import com.conekta.model.ChargeResponsePaymentMethod; +import com.conekta.model.ChargeResponseRefunds; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.conekta.JSON; + + +/** + * ChargesOrderResponseAllOfData + */ +@JsonPropertyOrder({ + ChargesOrderResponseAllOfData.JSON_PROPERTY_AMOUNT, + ChargesOrderResponseAllOfData.JSON_PROPERTY_CHANNEL, + ChargesOrderResponseAllOfData.JSON_PROPERTY_CREATED_AT, + ChargesOrderResponseAllOfData.JSON_PROPERTY_CURRENCY, + ChargesOrderResponseAllOfData.JSON_PROPERTY_CUSTOMER_ID, + ChargesOrderResponseAllOfData.JSON_PROPERTY_DESCRIPTION, + ChargesOrderResponseAllOfData.JSON_PROPERTY_DEVICE_FINGERPRINT, + ChargesOrderResponseAllOfData.JSON_PROPERTY_FAILURE_CODE, + ChargesOrderResponseAllOfData.JSON_PROPERTY_FAILURE_MESSAGE, + ChargesOrderResponseAllOfData.JSON_PROPERTY_ID, + ChargesOrderResponseAllOfData.JSON_PROPERTY_LIVEMODE, + ChargesOrderResponseAllOfData.JSON_PROPERTY_OBJECT, + ChargesOrderResponseAllOfData.JSON_PROPERTY_ORDER_ID, + ChargesOrderResponseAllOfData.JSON_PROPERTY_PAID_AT, + ChargesOrderResponseAllOfData.JSON_PROPERTY_PAYMENT_METHOD, + ChargesOrderResponseAllOfData.JSON_PROPERTY_REFERENCE_ID, + ChargesOrderResponseAllOfData.JSON_PROPERTY_REFUNDS, + ChargesOrderResponseAllOfData.JSON_PROPERTY_STATUS +}) +@JsonTypeName("charges_order_response_allOf_data") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0") +public class ChargesOrderResponseAllOfData { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_CHANNEL = "channel"; + private ChargeResponseChannel channel; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private Long createdAt; + + public static final String JSON_PROPERTY_CURRENCY = "currency"; + private String currency; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customer_id"; + private String customerId; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_DEVICE_FINGERPRINT = "device_fingerprint"; + private String deviceFingerprint; + + public static final String JSON_PROPERTY_FAILURE_CODE = "failure_code"; + private String failureCode; + + public static final String JSON_PROPERTY_FAILURE_MESSAGE = "failure_message"; + private String failureMessage; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_LIVEMODE = "livemode"; + private Boolean livemode; + + public static final String JSON_PROPERTY_OBJECT = "object"; + private String _object; + + public static final String JSON_PROPERTY_ORDER_ID = "order_id"; + private String orderId; + + public static final String JSON_PROPERTY_PAID_AT = "paid_at"; + private Long paidAt; + + public static final String JSON_PROPERTY_PAYMENT_METHOD = "payment_method"; + private ChargeResponsePaymentMethod paymentMethod; + + public static final String JSON_PROPERTY_REFERENCE_ID = "reference_id"; + private String referenceId; + + public static final String JSON_PROPERTY_REFUNDS = "refunds"; + private ChargeResponseRefunds refunds; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public ChargesOrderResponseAllOfData() { + } + + public ChargesOrderResponseAllOfData amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public ChargesOrderResponseAllOfData channel(ChargeResponseChannel channel) { + this.channel = channel; + return this; + } + + /** + * Get channel + * @return channel + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHANNEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ChargeResponseChannel getChannel() { + return channel; + } + + + @JsonProperty(JSON_PROPERTY_CHANNEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChannel(ChargeResponseChannel channel) { + this.channel = channel; + } + + + public ChargesOrderResponseAllOfData createdAt(Long createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + + public ChargesOrderResponseAllOfData currency(String currency) { + this.currency = currency; + return this; + } + + /** + * Get currency + * @return currency + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCurrency() { + return currency; + } + + + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrency(String currency) { + this.currency = currency; + } + + + public ChargesOrderResponseAllOfData customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ChargesOrderResponseAllOfData description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + + public ChargesOrderResponseAllOfData deviceFingerprint(String deviceFingerprint) { + this.deviceFingerprint = deviceFingerprint; + return this; + } + + /** + * Get deviceFingerprint + * @return deviceFingerprint + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE_FINGERPRINT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDeviceFingerprint() { + return deviceFingerprint; + } + + + @JsonProperty(JSON_PROPERTY_DEVICE_FINGERPRINT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeviceFingerprint(String deviceFingerprint) { + this.deviceFingerprint = deviceFingerprint; + } + + + public ChargesOrderResponseAllOfData failureCode(String failureCode) { + this.failureCode = failureCode; + return this; + } + + /** + * Get failureCode + * @return failureCode + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFailureCode() { + return failureCode; + } + + + @JsonProperty(JSON_PROPERTY_FAILURE_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailureCode(String failureCode) { + this.failureCode = failureCode; + } + + + public ChargesOrderResponseAllOfData failureMessage(String failureMessage) { + this.failureMessage = failureMessage; + return this; + } + + /** + * Get failureMessage + * @return failureMessage + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFailureMessage() { + return failureMessage; + } + + + @JsonProperty(JSON_PROPERTY_FAILURE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailureMessage(String failureMessage) { + this.failureMessage = failureMessage; + } + + + public ChargesOrderResponseAllOfData id(String id) { + this.id = id; + return this; + } + + /** + * Charge ID + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public ChargesOrderResponseAllOfData livemode(Boolean livemode) { + this.livemode = livemode; + return this; + } + + /** + * Whether the charge was made in live mode or not + * @return livemode + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEMODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLivemode() { + return livemode; + } + + + @JsonProperty(JSON_PROPERTY_LIVEMODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLivemode(Boolean livemode) { + this.livemode = livemode; + } + + + public ChargesOrderResponseAllOfData _object(String _object) { + this._object = _object; + return this; + } + + /** + * Get _object + * @return _object + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getObject() { + return _object; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setObject(String _object) { + this._object = _object; + } + + + public ChargesOrderResponseAllOfData orderId(String orderId) { + this.orderId = orderId; + return this; + } + + /** + * Order ID + * @return orderId + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOrderId() { + return orderId; + } + + + @JsonProperty(JSON_PROPERTY_ORDER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + + public ChargesOrderResponseAllOfData paidAt(Long paidAt) { + this.paidAt = paidAt; + return this; + } + + /** + * Payment date + * @return paidAt + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAID_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getPaidAt() { + return paidAt; + } + + + @JsonProperty(JSON_PROPERTY_PAID_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaidAt(Long paidAt) { + this.paidAt = paidAt; + } + + + public ChargesOrderResponseAllOfData paymentMethod(ChargeResponsePaymentMethod paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Get paymentMethod + * @return paymentMethod + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ChargeResponsePaymentMethod getPaymentMethod() { + return paymentMethod; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentMethod(ChargeResponsePaymentMethod paymentMethod) { + this.paymentMethod = paymentMethod; + } + + + public ChargesOrderResponseAllOfData referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Reference ID of the charge + * @return referenceId + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReferenceId() { + return referenceId; + } + + + @JsonProperty(JSON_PROPERTY_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public ChargesOrderResponseAllOfData refunds(ChargeResponseRefunds refunds) { + this.refunds = refunds; + return this; + } + + /** + * Get refunds + * @return refunds + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REFUNDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ChargeResponseRefunds getRefunds() { + return refunds; + } + + + @JsonProperty(JSON_PROPERTY_REFUNDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRefunds(ChargeResponseRefunds refunds) { + this.refunds = refunds; + } + + + public ChargesOrderResponseAllOfData status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(String status) { + this.status = status; + } + + + /** + * Return true if this charges_order_response_allOf_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChargesOrderResponseAllOfData chargesOrderResponseAllOfData = (ChargesOrderResponseAllOfData) o; + return Objects.equals(this.amount, chargesOrderResponseAllOfData.amount) && + Objects.equals(this.channel, chargesOrderResponseAllOfData.channel) && + Objects.equals(this.createdAt, chargesOrderResponseAllOfData.createdAt) && + Objects.equals(this.currency, chargesOrderResponseAllOfData.currency) && + Objects.equals(this.customerId, chargesOrderResponseAllOfData.customerId) && + Objects.equals(this.description, chargesOrderResponseAllOfData.description) && + Objects.equals(this.deviceFingerprint, chargesOrderResponseAllOfData.deviceFingerprint) && + Objects.equals(this.failureCode, chargesOrderResponseAllOfData.failureCode) && + Objects.equals(this.failureMessage, chargesOrderResponseAllOfData.failureMessage) && + Objects.equals(this.id, chargesOrderResponseAllOfData.id) && + Objects.equals(this.livemode, chargesOrderResponseAllOfData.livemode) && + Objects.equals(this._object, chargesOrderResponseAllOfData._object) && + Objects.equals(this.orderId, chargesOrderResponseAllOfData.orderId) && + Objects.equals(this.paidAt, chargesOrderResponseAllOfData.paidAt) && + Objects.equals(this.paymentMethod, chargesOrderResponseAllOfData.paymentMethod) && + Objects.equals(this.referenceId, chargesOrderResponseAllOfData.referenceId) && + Objects.equals(this.refunds, chargesOrderResponseAllOfData.refunds) && + Objects.equals(this.status, chargesOrderResponseAllOfData.status); + } + + @Override + public int hashCode() { + return Objects.hash(amount, channel, createdAt, currency, customerId, description, deviceFingerprint, failureCode, failureMessage, id, livemode, _object, orderId, paidAt, paymentMethod, referenceId, refunds, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChargesOrderResponseAllOfData {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" deviceFingerprint: ").append(toIndentedString(deviceFingerprint)).append("\n"); + sb.append(" failureCode: ").append(toIndentedString(failureCode)).append("\n"); + sb.append(" failureMessage: ").append(toIndentedString(failureMessage)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" livemode: ").append(toIndentedString(livemode)).append("\n"); + sb.append(" _object: ").append(toIndentedString(_object)).append("\n"); + sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); + sb.append(" paidAt: ").append(toIndentedString(paidAt)).append("\n"); + sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" refunds: ").append(toIndentedString(refunds)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/conekta/model/CheckoutRequest.java b/src/main/java/com/conekta/model/CheckoutRequest.java index 48c8e4c..eabf8fa 100644 --- a/src/main/java/com/conekta/model/CheckoutRequest.java +++ b/src/main/java/com/conekta/model/CheckoutRequest.java @@ -37,6 +37,7 @@ CheckoutRequest.JSON_PROPERTY_FAILURE_URL, CheckoutRequest.JSON_PROPERTY_MONTHLY_INSTALLMENTS_ENABLED, CheckoutRequest.JSON_PROPERTY_MONTHLY_INSTALLMENTS_OPTIONS, + CheckoutRequest.JSON_PROPERTY_MAX_FAILED_RETRIES, CheckoutRequest.JSON_PROPERTY_NAME, CheckoutRequest.JSON_PROPERTY_ON_DEMAND_ENABLED, CheckoutRequest.JSON_PROPERTY_REDIRECTION_TIME, @@ -61,6 +62,9 @@ public class CheckoutRequest { public static final String JSON_PROPERTY_MONTHLY_INSTALLMENTS_OPTIONS = "monthly_installments_options"; private List<Integer> monthlyInstallmentsOptions = new ArrayList<>(); + public static final String JSON_PROPERTY_MAX_FAILED_RETRIES = "max_failed_retries"; + private Integer maxFailedRetries; + public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -220,6 +224,31 @@ public void setMonthlyInstallmentsOptions(List<Integer> monthlyInstallmentsOptio } + public CheckoutRequest maxFailedRetries(Integer maxFailedRetries) { + this.maxFailedRetries = maxFailedRetries; + return this; + } + + /** + * Number of retries allowed before the checkout is marked as failed + * @return maxFailedRetries + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_FAILED_RETRIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getMaxFailedRetries() { + return maxFailedRetries; + } + + + @JsonProperty(JSON_PROPERTY_MAX_FAILED_RETRIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxFailedRetries(Integer maxFailedRetries) { + this.maxFailedRetries = maxFailedRetries; + } + + public CheckoutRequest name(String name) { this.name = name; return this; @@ -362,6 +391,7 @@ public boolean equals(Object o) { Objects.equals(this.failureUrl, checkoutRequest.failureUrl) && Objects.equals(this.monthlyInstallmentsEnabled, checkoutRequest.monthlyInstallmentsEnabled) && Objects.equals(this.monthlyInstallmentsOptions, checkoutRequest.monthlyInstallmentsOptions) && + Objects.equals(this.maxFailedRetries, checkoutRequest.maxFailedRetries) && Objects.equals(this.name, checkoutRequest.name) && Objects.equals(this.onDemandEnabled, checkoutRequest.onDemandEnabled) && Objects.equals(this.redirectionTime, checkoutRequest.redirectionTime) && @@ -371,7 +401,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(allowedPaymentMethods, expiresAt, failureUrl, monthlyInstallmentsEnabled, monthlyInstallmentsOptions, name, onDemandEnabled, redirectionTime, successUrl, type); + return Objects.hash(allowedPaymentMethods, expiresAt, failureUrl, monthlyInstallmentsEnabled, monthlyInstallmentsOptions, maxFailedRetries, name, onDemandEnabled, redirectionTime, successUrl, type); } @Override @@ -383,6 +413,7 @@ public String toString() { sb.append(" failureUrl: ").append(toIndentedString(failureUrl)).append("\n"); sb.append(" monthlyInstallmentsEnabled: ").append(toIndentedString(monthlyInstallmentsEnabled)).append("\n"); sb.append(" monthlyInstallmentsOptions: ").append(toIndentedString(monthlyInstallmentsOptions)).append("\n"); + sb.append(" maxFailedRetries: ").append(toIndentedString(maxFailedRetries)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" onDemandEnabled: ").append(toIndentedString(onDemandEnabled)).append("\n"); sb.append(" redirectionTime: ").append(toIndentedString(redirectionTime)).append("\n"); diff --git a/src/main/java/com/conekta/model/Customer.java b/src/main/java/com/conekta/model/Customer.java index a917bb5..f98cf70 100644 --- a/src/main/java/com/conekta/model/Customer.java +++ b/src/main/java/com/conekta/model/Customer.java @@ -42,12 +42,14 @@ Customer.JSON_PROPERTY_ANTIFRAUD_INFO, Customer.JSON_PROPERTY_CORPORATE, Customer.JSON_PROPERTY_CUSTOM_REFERENCE, + Customer.JSON_PROPERTY_DATE_OF_BIRTH, Customer.JSON_PROPERTY_EMAIL, Customer.JSON_PROPERTY_DEFAULT_PAYMENT_SOURCE_ID, Customer.JSON_PROPERTY_DEFAULT_SHIPPING_CONTACT_ID, Customer.JSON_PROPERTY_FISCAL_ENTITIES, Customer.JSON_PROPERTY_METADATA, Customer.JSON_PROPERTY_NAME, + Customer.JSON_PROPERTY_NATIONAL_ID, Customer.JSON_PROPERTY_PAYMENT_SOURCES, Customer.JSON_PROPERTY_PHONE, Customer.JSON_PROPERTY_PLAN_ID, @@ -66,6 +68,9 @@ public class Customer { public static final String JSON_PROPERTY_CUSTOM_REFERENCE = "custom_reference"; private String customReference; + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "date_of_birth"; + private String dateOfBirth; + public static final String JSON_PROPERTY_EMAIL = "email"; private String email; @@ -84,6 +89,9 @@ public class Customer { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_NATIONAL_ID = "national_id"; + private String nationalId; + public static final String JSON_PROPERTY_PAYMENT_SOURCES = "payment_sources"; private List<CustomerPaymentMethodsRequest> paymentSources = new ArrayList<>(); @@ -177,6 +185,31 @@ public void setCustomReference(String customReference) { } + public Customer dateOfBirth(String dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * It is a parameter that allows to identify the date of birth of the client. + * @return dateOfBirth + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfBirth(String dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + public Customer email(String email) { this.email = email; return this; @@ -343,6 +376,31 @@ public void setName(String name) { } + public Customer nationalId(String nationalId) { + this.nationalId = nationalId; + return this; + } + + /** + * It is a parameter that allows to identify the national identification number of the client. + * @return nationalId + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationalId() { + return nationalId; + } + + + @JsonProperty(JSON_PROPERTY_NATIONAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationalId(String nationalId) { + this.nationalId = nationalId; + } + + public Customer paymentSources(List<CustomerPaymentMethodsRequest> paymentSources) { this.paymentSources = paymentSources; return this; @@ -499,12 +557,14 @@ public boolean equals(Object o) { return Objects.equals(this.antifraudInfo, customer.antifraudInfo) && Objects.equals(this.corporate, customer.corporate) && Objects.equals(this.customReference, customer.customReference) && + Objects.equals(this.dateOfBirth, customer.dateOfBirth) && Objects.equals(this.email, customer.email) && Objects.equals(this.defaultPaymentSourceId, customer.defaultPaymentSourceId) && Objects.equals(this.defaultShippingContactId, customer.defaultShippingContactId) && Objects.equals(this.fiscalEntities, customer.fiscalEntities) && Objects.equals(this.metadata, customer.metadata) && Objects.equals(this.name, customer.name) && + Objects.equals(this.nationalId, customer.nationalId) && Objects.equals(this.paymentSources, customer.paymentSources) && Objects.equals(this.phone, customer.phone) && Objects.equals(this.planId, customer.planId) && @@ -514,7 +574,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(antifraudInfo, corporate, customReference, email, defaultPaymentSourceId, defaultShippingContactId, fiscalEntities, metadata, name, paymentSources, phone, planId, shippingContacts, subscription); + return Objects.hash(antifraudInfo, corporate, customReference, dateOfBirth, email, defaultPaymentSourceId, defaultShippingContactId, fiscalEntities, metadata, name, nationalId, paymentSources, phone, planId, shippingContacts, subscription); } @Override @@ -524,12 +584,14 @@ public String toString() { sb.append(" antifraudInfo: ").append(toIndentedString(antifraudInfo)).append("\n"); sb.append(" corporate: ").append(toIndentedString(corporate)).append("\n"); sb.append(" customReference: ").append(toIndentedString(customReference)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" defaultPaymentSourceId: ").append(toIndentedString(defaultPaymentSourceId)).append("\n"); sb.append(" defaultShippingContactId: ").append(toIndentedString(defaultShippingContactId)).append("\n"); sb.append(" fiscalEntities: ").append(toIndentedString(fiscalEntities)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" nationalId: ").append(toIndentedString(nationalId)).append("\n"); sb.append(" paymentSources: ").append(toIndentedString(paymentSources)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" planId: ").append(toIndentedString(planId)).append("\n"); diff --git a/src/main/java/com/conekta/model/CustomerResponse.java b/src/main/java/com/conekta/model/CustomerResponse.java index 489ac8f..05afaed 100644 --- a/src/main/java/com/conekta/model/CustomerResponse.java +++ b/src/main/java/com/conekta/model/CustomerResponse.java @@ -41,6 +41,7 @@ CustomerResponse.JSON_PROPERTY_CORPORATE, CustomerResponse.JSON_PROPERTY_CREATED_AT, CustomerResponse.JSON_PROPERTY_CUSTOM_REFERENCE, + CustomerResponse.JSON_PROPERTY_DATE_OF_BIRTH, CustomerResponse.JSON_PROPERTY_DEFAULT_FISCAL_ENTITY_ID, CustomerResponse.JSON_PROPERTY_DEFAULT_SHIPPING_CONTACT_ID, CustomerResponse.JSON_PROPERTY_DEFAULT_PAYMENT_SOURCE_ID, @@ -49,6 +50,7 @@ CustomerResponse.JSON_PROPERTY_ID, CustomerResponse.JSON_PROPERTY_LIVEMODE, CustomerResponse.JSON_PROPERTY_NAME, + CustomerResponse.JSON_PROPERTY_NATIONAL_ID, CustomerResponse.JSON_PROPERTY_METADATA, CustomerResponse.JSON_PROPERTY_OBJECT, CustomerResponse.JSON_PROPERTY_PAYMENT_SOURCES, @@ -71,6 +73,9 @@ public class CustomerResponse { public static final String JSON_PROPERTY_CUSTOM_REFERENCE = "custom_reference"; private String customReference; + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "date_of_birth"; + private String dateOfBirth; + public static final String JSON_PROPERTY_DEFAULT_FISCAL_ENTITY_ID = "default_fiscal_entity_id"; private String defaultFiscalEntityId; @@ -95,6 +100,9 @@ public class CustomerResponse { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_NATIONAL_ID = "national_id"; + private String nationalId; + public static final String JSON_PROPERTY_METADATA = "metadata"; private Map<String, Object> metadata = new HashMap<>(); @@ -216,6 +224,31 @@ public void setCustomReference(String customReference) { } + public CustomerResponse dateOfBirth(String dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * It is a parameter that allows to identify the date of birth of the client. + * @return dateOfBirth + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfBirth(String dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + public CustomerResponse defaultFiscalEntityId(String defaultFiscalEntityId) { this.defaultFiscalEntityId = defaultFiscalEntityId; return this; @@ -416,6 +449,31 @@ public void setName(String name) { } + public CustomerResponse nationalId(String nationalId) { + this.nationalId = nationalId; + return this; + } + + /** + * It is a parameter that allows to identify the national identification number of the client. + * @return nationalId + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationalId() { + return nationalId; + } + + + @JsonProperty(JSON_PROPERTY_NATIONAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationalId(String nationalId) { + this.nationalId = nationalId; + } + + public CustomerResponse metadata(Map<String, Object> metadata) { this.metadata = metadata; return this; @@ -590,6 +648,7 @@ public boolean equals(Object o) { Objects.equals(this.corporate, customerResponse.corporate) && Objects.equals(this.createdAt, customerResponse.createdAt) && Objects.equals(this.customReference, customerResponse.customReference) && + Objects.equals(this.dateOfBirth, customerResponse.dateOfBirth) && Objects.equals(this.defaultFiscalEntityId, customerResponse.defaultFiscalEntityId) && Objects.equals(this.defaultShippingContactId, customerResponse.defaultShippingContactId) && Objects.equals(this.defaultPaymentSourceId, customerResponse.defaultPaymentSourceId) && @@ -598,6 +657,7 @@ public boolean equals(Object o) { Objects.equals(this.id, customerResponse.id) && Objects.equals(this.livemode, customerResponse.livemode) && Objects.equals(this.name, customerResponse.name) && + Objects.equals(this.nationalId, customerResponse.nationalId) && Objects.equals(this.metadata, customerResponse.metadata) && Objects.equals(this._object, customerResponse._object) && Objects.equals(this.paymentSources, customerResponse.paymentSources) && @@ -608,7 +668,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(antifraudInfo, corporate, createdAt, customReference, defaultFiscalEntityId, defaultShippingContactId, defaultPaymentSourceId, email, fiscalEntities, id, livemode, name, metadata, _object, paymentSources, phone, shippingContacts, subscription); + return Objects.hash(antifraudInfo, corporate, createdAt, customReference, dateOfBirth, defaultFiscalEntityId, defaultShippingContactId, defaultPaymentSourceId, email, fiscalEntities, id, livemode, name, nationalId, metadata, _object, paymentSources, phone, shippingContacts, subscription); } @Override @@ -619,6 +679,7 @@ public String toString() { sb.append(" corporate: ").append(toIndentedString(corporate)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" customReference: ").append(toIndentedString(customReference)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); sb.append(" defaultFiscalEntityId: ").append(toIndentedString(defaultFiscalEntityId)).append("\n"); sb.append(" defaultShippingContactId: ").append(toIndentedString(defaultShippingContactId)).append("\n"); sb.append(" defaultPaymentSourceId: ").append(toIndentedString(defaultPaymentSourceId)).append("\n"); @@ -627,6 +688,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" livemode: ").append(toIndentedString(livemode)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" nationalId: ").append(toIndentedString(nationalId)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" _object: ").append(toIndentedString(_object)).append("\n"); sb.append(" paymentSources: ").append(toIndentedString(paymentSources)).append("\n"); diff --git a/src/main/java/com/conekta/model/OrderResponseCheckout.java b/src/main/java/com/conekta/model/OrderResponseCheckout.java index 76fbd2e..a41b124 100644 --- a/src/main/java/com/conekta/model/OrderResponseCheckout.java +++ b/src/main/java/com/conekta/model/OrderResponseCheckout.java @@ -44,6 +44,7 @@ OrderResponseCheckout.JSON_PROPERTY_ID, OrderResponseCheckout.JSON_PROPERTY_IS_REDIRECT_ON_FAILURE, OrderResponseCheckout.JSON_PROPERTY_LIVEMODE, + OrderResponseCheckout.JSON_PROPERTY_MAX_FAILED_RETRIES, OrderResponseCheckout.JSON_PROPERTY_METADATA, OrderResponseCheckout.JSON_PROPERTY_MONTHLY_INSTALLMENTS_ENABLED, OrderResponseCheckout.JSON_PROPERTY_MONTHLY_INSTALLMENTS_OPTIONS, @@ -95,6 +96,9 @@ public class OrderResponseCheckout { public static final String JSON_PROPERTY_LIVEMODE = "livemode"; private Boolean livemode; + public static final String JSON_PROPERTY_MAX_FAILED_RETRIES = "max_failed_retries"; + private Integer maxFailedRetries; + public static final String JSON_PROPERTY_METADATA = "metadata"; private Map<String, Object> metadata = new HashMap<>(); @@ -415,6 +419,31 @@ public void setLivemode(Boolean livemode) { } + public OrderResponseCheckout maxFailedRetries(Integer maxFailedRetries) { + this.maxFailedRetries = maxFailedRetries; + return this; + } + + /** + * Number of retries allowed before the checkout is marked as failed + * @return maxFailedRetries + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_FAILED_RETRIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getMaxFailedRetries() { + return maxFailedRetries; + } + + + @JsonProperty(JSON_PROPERTY_MAX_FAILED_RETRIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxFailedRetries(Integer maxFailedRetries) { + this.maxFailedRetries = maxFailedRetries; + } + + public OrderResponseCheckout metadata(Map<String, Object> metadata) { this.metadata = metadata; return this; @@ -878,6 +907,7 @@ public boolean equals(Object o) { Objects.equals(this.id, orderResponseCheckout.id) && Objects.equals(this.isRedirectOnFailure, orderResponseCheckout.isRedirectOnFailure) && Objects.equals(this.livemode, orderResponseCheckout.livemode) && + Objects.equals(this.maxFailedRetries, orderResponseCheckout.maxFailedRetries) && Objects.equals(this.metadata, orderResponseCheckout.metadata) && Objects.equals(this.monthlyInstallmentsEnabled, orderResponseCheckout.monthlyInstallmentsEnabled) && Objects.equals(this.monthlyInstallmentsOptions, orderResponseCheckout.monthlyInstallmentsOptions) && @@ -899,7 +929,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(allowedPaymentMethods, canNotExpire, emailsSent, excludeCardNetworks, expiresAt, failureUrl, force3dsFlow, id, isRedirectOnFailure, livemode, metadata, monthlyInstallmentsEnabled, monthlyInstallmentsOptions, name, needsShippingContact, _object, onDemandEnabled, paidPaymentsCount, recurrent, redirectionTime, slug, smsSent, successUrl, startsAt, status, type, url); + return Objects.hash(allowedPaymentMethods, canNotExpire, emailsSent, excludeCardNetworks, expiresAt, failureUrl, force3dsFlow, id, isRedirectOnFailure, livemode, maxFailedRetries, metadata, monthlyInstallmentsEnabled, monthlyInstallmentsOptions, name, needsShippingContact, _object, onDemandEnabled, paidPaymentsCount, recurrent, redirectionTime, slug, smsSent, successUrl, startsAt, status, type, url); } @Override @@ -916,6 +946,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" isRedirectOnFailure: ").append(toIndentedString(isRedirectOnFailure)).append("\n"); sb.append(" livemode: ").append(toIndentedString(livemode)).append("\n"); + sb.append(" maxFailedRetries: ").append(toIndentedString(maxFailedRetries)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" monthlyInstallmentsEnabled: ").append(toIndentedString(monthlyInstallmentsEnabled)).append("\n"); sb.append(" monthlyInstallmentsOptions: ").append(toIndentedString(monthlyInstallmentsOptions)).append("\n"); diff --git a/src/main/java/com/conekta/model/PaymentMethodCash.java b/src/main/java/com/conekta/model/PaymentMethodCash.java index 7f07ed5..d6d3fe9 100644 --- a/src/main/java/com/conekta/model/PaymentMethodCash.java +++ b/src/main/java/com/conekta/model/PaymentMethodCash.java @@ -32,11 +32,13 @@ @JsonPropertyOrder({ PaymentMethodCash.JSON_PROPERTY_TYPE, PaymentMethodCash.JSON_PROPERTY_OBJECT, + PaymentMethodCash.JSON_PROPERTY_AGREEMENT, PaymentMethodCash.JSON_PROPERTY_AUTH_CODE, PaymentMethodCash.JSON_PROPERTY_CASHIER_ID, PaymentMethodCash.JSON_PROPERTY_REFERENCE, PaymentMethodCash.JSON_PROPERTY_BARCODE_URL, PaymentMethodCash.JSON_PROPERTY_EXPIRES_AT, + PaymentMethodCash.JSON_PROPERTY_PRODUCT_TYPE, PaymentMethodCash.JSON_PROPERTY_SERVICE_NAME, PaymentMethodCash.JSON_PROPERTY_STORE, PaymentMethodCash.JSON_PROPERTY_STORE_NAME, @@ -51,6 +53,9 @@ public class PaymentMethodCash { public static final String JSON_PROPERTY_OBJECT = "object"; private String _object; + public static final String JSON_PROPERTY_AGREEMENT = "agreement"; + private String agreement; + public static final String JSON_PROPERTY_AUTH_CODE = "auth_code"; private Integer authCode; @@ -66,6 +71,9 @@ public class PaymentMethodCash { public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; private Long expiresAt; + public static final String JSON_PROPERTY_PRODUCT_TYPE = "product_type"; + private String productType; + public static final String JSON_PROPERTY_SERVICE_NAME = "service_name"; private String serviceName; @@ -131,6 +139,31 @@ public void setObject(String _object) { } + public PaymentMethodCash agreement(String agreement) { + this.agreement = agreement; + return this; + } + + /** + * Agreement ID + * @return agreement + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGREEMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAgreement() { + return agreement; + } + + + @JsonProperty(JSON_PROPERTY_AGREEMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAgreement(String agreement) { + this.agreement = agreement; + } + + public PaymentMethodCash authCode(Integer authCode) { this.authCode = authCode; return this; @@ -256,6 +289,31 @@ public void setExpiresAt(Long expiresAt) { } + public PaymentMethodCash productType(String productType) { + this.productType = productType; + return this; + } + + /** + * Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in, etc. + * @return productType + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRODUCT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getProductType() { + return productType; + } + + + @JsonProperty(JSON_PROPERTY_PRODUCT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProductType(String productType) { + this.productType = productType; + } + + public PaymentMethodCash serviceName(String serviceName) { this.serviceName = serviceName; return this; @@ -370,11 +428,13 @@ public boolean equals(Object o) { PaymentMethodCash paymentMethodCash = (PaymentMethodCash) o; return Objects.equals(this.type, paymentMethodCash.type) && Objects.equals(this._object, paymentMethodCash._object) && + Objects.equals(this.agreement, paymentMethodCash.agreement) && Objects.equals(this.authCode, paymentMethodCash.authCode) && Objects.equals(this.cashierId, paymentMethodCash.cashierId) && Objects.equals(this.reference, paymentMethodCash.reference) && Objects.equals(this.barcodeUrl, paymentMethodCash.barcodeUrl) && Objects.equals(this.expiresAt, paymentMethodCash.expiresAt) && + Objects.equals(this.productType, paymentMethodCash.productType) && Objects.equals(this.serviceName, paymentMethodCash.serviceName) && Objects.equals(this.store, paymentMethodCash.store) && Objects.equals(this.storeName, paymentMethodCash.storeName) && @@ -383,7 +443,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(type, _object, authCode, cashierId, reference, barcodeUrl, expiresAt, serviceName, store, storeName, customerIpAddress); + return Objects.hash(type, _object, agreement, authCode, cashierId, reference, barcodeUrl, expiresAt, productType, serviceName, store, storeName, customerIpAddress); } @Override @@ -392,11 +452,13 @@ public String toString() { sb.append("class PaymentMethodCash {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" _object: ").append(toIndentedString(_object)).append("\n"); + sb.append(" agreement: ").append(toIndentedString(agreement)).append("\n"); sb.append(" authCode: ").append(toIndentedString(authCode)).append("\n"); sb.append(" cashierId: ").append(toIndentedString(cashierId)).append("\n"); sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); sb.append(" barcodeUrl: ").append(toIndentedString(barcodeUrl)).append("\n"); sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append(" productType: ").append(toIndentedString(productType)).append("\n"); sb.append(" serviceName: ").append(toIndentedString(serviceName)).append("\n"); sb.append(" store: ").append(toIndentedString(store)).append("\n"); sb.append(" storeName: ").append(toIndentedString(storeName)).append("\n"); diff --git a/src/main/java/com/conekta/model/UpdateCustomer.java b/src/main/java/com/conekta/model/UpdateCustomer.java index 5d50d1c..0029c2a 100644 --- a/src/main/java/com/conekta/model/UpdateCustomer.java +++ b/src/main/java/com/conekta/model/UpdateCustomer.java @@ -40,6 +40,7 @@ */ @JsonPropertyOrder({ UpdateCustomer.JSON_PROPERTY_ANTIFRAUD_INFO, + UpdateCustomer.JSON_PROPERTY_DATE_OF_BIRTH, UpdateCustomer.JSON_PROPERTY_DEFAULT_PAYMENT_SOURCE_ID, UpdateCustomer.JSON_PROPERTY_EMAIL, UpdateCustomer.JSON_PROPERTY_NAME, @@ -50,6 +51,7 @@ UpdateCustomer.JSON_PROPERTY_CUSTOM_REFERENCE, UpdateCustomer.JSON_PROPERTY_FISCAL_ENTITIES, UpdateCustomer.JSON_PROPERTY_METADATA, + UpdateCustomer.JSON_PROPERTY_NATIONAL_ID, UpdateCustomer.JSON_PROPERTY_PAYMENT_SOURCES, UpdateCustomer.JSON_PROPERTY_SHIPPING_CONTACTS, UpdateCustomer.JSON_PROPERTY_SUBSCRIPTION @@ -60,6 +62,9 @@ public class UpdateCustomer { public static final String JSON_PROPERTY_ANTIFRAUD_INFO = "antifraud_info"; private UpdateCustomerAntifraudInfo antifraudInfo; + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "date_of_birth"; + private String dateOfBirth; + public static final String JSON_PROPERTY_DEFAULT_PAYMENT_SOURCE_ID = "default_payment_source_id"; private String defaultPaymentSourceId; @@ -90,6 +95,9 @@ public class UpdateCustomer { public static final String JSON_PROPERTY_METADATA = "metadata"; private Map<String, Object> metadata = new HashMap<>(); + public static final String JSON_PROPERTY_NATIONAL_ID = "national_id"; + private String nationalId; + public static final String JSON_PROPERTY_PAYMENT_SOURCES = "payment_sources"; private List<CustomerPaymentMethodsRequest> paymentSources = new ArrayList<>(); @@ -127,6 +135,31 @@ public void setAntifraudInfo(UpdateCustomerAntifraudInfo antifraudInfo) { } + public UpdateCustomer dateOfBirth(String dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * It is a parameter that allows to identify the date of birth of the client. + * @return dateOfBirth + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfBirth(String dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + public UpdateCustomer defaultPaymentSourceId(String defaultPaymentSourceId) { this.defaultPaymentSourceId = defaultPaymentSourceId; return this; @@ -393,6 +426,31 @@ public void setMetadata(Map<String, Object> metadata) { } + public UpdateCustomer nationalId(String nationalId) { + this.nationalId = nationalId; + return this; + } + + /** + * It is a parameter that allows to identify the national identification number of the client. + * @return nationalId + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationalId() { + return nationalId; + } + + + @JsonProperty(JSON_PROPERTY_NATIONAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationalId(String nationalId) { + this.nationalId = nationalId; + } + + public UpdateCustomer paymentSources(List<CustomerPaymentMethodsRequest> paymentSources) { this.paymentSources = paymentSources; return this; @@ -497,6 +555,7 @@ public boolean equals(Object o) { } UpdateCustomer updateCustomer = (UpdateCustomer) o; return Objects.equals(this.antifraudInfo, updateCustomer.antifraudInfo) && + Objects.equals(this.dateOfBirth, updateCustomer.dateOfBirth) && Objects.equals(this.defaultPaymentSourceId, updateCustomer.defaultPaymentSourceId) && Objects.equals(this.email, updateCustomer.email) && Objects.equals(this.name, updateCustomer.name) && @@ -507,6 +566,7 @@ public boolean equals(Object o) { Objects.equals(this.customReference, updateCustomer.customReference) && Objects.equals(this.fiscalEntities, updateCustomer.fiscalEntities) && Objects.equals(this.metadata, updateCustomer.metadata) && + Objects.equals(this.nationalId, updateCustomer.nationalId) && Objects.equals(this.paymentSources, updateCustomer.paymentSources) && Objects.equals(this.shippingContacts, updateCustomer.shippingContacts) && Objects.equals(this.subscription, updateCustomer.subscription); @@ -514,7 +574,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(antifraudInfo, defaultPaymentSourceId, email, name, phone, planId, defaultShippingContactId, corporate, customReference, fiscalEntities, metadata, paymentSources, shippingContacts, subscription); + return Objects.hash(antifraudInfo, dateOfBirth, defaultPaymentSourceId, email, name, phone, planId, defaultShippingContactId, corporate, customReference, fiscalEntities, metadata, nationalId, paymentSources, shippingContacts, subscription); } @Override @@ -522,6 +582,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateCustomer {\n"); sb.append(" antifraudInfo: ").append(toIndentedString(antifraudInfo)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); sb.append(" defaultPaymentSourceId: ").append(toIndentedString(defaultPaymentSourceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); @@ -532,6 +593,7 @@ public String toString() { sb.append(" customReference: ").append(toIndentedString(customReference)).append("\n"); sb.append(" fiscalEntities: ").append(toIndentedString(fiscalEntities)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" nationalId: ").append(toIndentedString(nationalId)).append("\n"); sb.append(" paymentSources: ").append(toIndentedString(paymentSources)).append("\n"); sb.append(" shippingContacts: ").append(toIndentedString(shippingContacts)).append("\n"); sb.append(" subscription: ").append(toIndentedString(subscription)).append("\n");